WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] how to read value from xenstore inside kernel

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] how to read value from xenstore inside kernel
From: Kuriakose Mathew <kmathew123@xxxxxxxxx>
Date: Fri, 28 Aug 2009 14:22:17 +0530
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Fri, 28 Aug 2009 01:52:41 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=lrSEoQx51KHtml9R2HhNeT4nfSpfGQTphJr0NuHDc9c=; b=BgV4AouPQtOyiBSn+UmMJFfk1xx8F1CHMbMkuOSUakmNv5A5w8pw1kobVpOLOPL7Qx A2tmwoZ4O+mGqRjNu+mAHUpG7laSEjEdgkI+cPduZjCxMxiV5bkPhjdIOWvsC2qdSPUO xBQMXDBdcPakNqXVZ+ZIAWQYZ9Mg3oiKjxtqU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UEk1HTJXxDSIPqVM81PnK78eJWxwsUDPfkI9Q6DH4MSEH6lI+RJjXA8xhLf9BmboKb X15VEbWO0ohhyBfGPln+h64fBvCWXvQrtsoIGieyYFKcB9mvGjbpLPxwPsQwSE5oWJWT vvUvjewhjg4QWcoTdgC5z8VZ0FvHCKdncLCoE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D0177CE13@trantor>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9e81bde0908162340h42011f5cn7606c962fda89da4@xxxxxxxxxxxxxx> <20090817143826.GA4551@xxxxxxxxxxxxxxxxxxx> <9e81bde0908171055q5504683cm19cb2c70e24dfb88@xxxxxxxxxxxxxx> <20090817182023.GA6144@xxxxxxxxxxxxxxxxxxx> <9e81bde0908250357j5678af58ob56633561bf5a2bb@xxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D0177CE13@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
When I am using
  char * test;
  const char *nodename = "vif/2/0";
  test = xenbus_read(XBT_NIL, nodename, "mac", NULL);

in netback .c ,I am getting this error when the kernel is rebooted.

guest1 BUG: scheduling while atomic: xenwatch/0x00000100/13

and for a different nodename ( console , mac )

crash msg is as follows

In netback.c::net_tx_action called
BUG: scheduling while atomic: syslogd/0x00000100/4532
 [<c02f73c6>] schedule+0x5c6/0x990
 [<c0138654>] autoremove_wake_function+0x14/0x40
 [<c011aeb9>] __wake_up_common+0x39/0x60
 [<c011b468>] __wake_up+0x38/0x50
 [<c02f84f3>] __mutex_lock_slowpath+0x53/0x8d
 [<c02f853c>] .text.lock.mutex+0xf/0x23
 [<c0248c19>] xs_talkv+0x49/0x180
 [<c0248e96>] xs_single+0x46/0x60
 [<c024913a>] xenbus_read+0x3a/0x60
 [<c025410e>] net_tx_action+0x2e/0xe90
 [<c015470e>] __generic_file_aio_write_nolock+0x34e/0x510
 [<c0154a3b>] __generic_file_write_nolock+0x8b/0xb0
 [<c0138640>] autoremove_wake_function+0x0/0x40
 [<c0188354>] do_path_lookup+0xc4/0x2e0
 [<c0186e9a>] getname+0xaa/0xe0
 [<c02f8398>] mutex_lock+0x8/0x20
 [<c017746b>] do_readv_writev+0x1fb/0x300
 [<c012905a>] tasklet_action+0x7a/0x130
 [<c0128a24>] __do_softirq+0x94/0x130
 [<c0128b4b>] do_softirq+0x8b/0xa0
 [<c0107444>] do_IRQ+0x44/0xa0
 [<c0243620>] evtchn_do_upcall+0xc0/0x190
 [<c010591d>] hypervisor_callback+0x3d/0x45
..
..
BUG: scheduling while atomic: syslogd/0x00000100/4532
 [<c02f73c6>] schedule+0x5c6/0x990
 [<c024861a>] xb_write+0x14a/0x1e0
 [<c0248ab5>] read_reply+0x75/0x100
 [<c0138640>] autoremove_wake_function+0x0/0x40
 [<c0248c71>] xs_talkv+0xa1/0x180
 [<c0248e96>] xs_single+0x46/0x60
 [<c024913a>] xenbus_read+0x3a/0x60
 [<c025410e>] net_tx_action+0x2e/0xe90
 [<c015470e>] __generic_file_aio_write_nolock+0x34e/0x510
 [<c0154a3b>] __generic_file_write_nolock+0x8b/0xb0
 [<c0138640>] autoremove_wake_function+0x0/0x40
 [<c0188354>] do_path_lookup+0xc4/0x2e0
 [<c0186e9a>] getname+0xaa/0xe0
 [<c02f8398>] mutex_lock+0x8/0x20
 [<c017746b>] do_readv_writev+0x1fb/0x300
 [<c012905a>] tasklet_action+0x7a/0x130
 [<c0128a24>] __do_softirq+0x94/0x130
 [<c0128b4b>] do_softirq+0x8b/0xa0
 [<c0107444>] do_IRQ+0x44/0xa0
 [<c0243620>] evtchn_do_upcall+0xc0/0x190
 [<c010591d>] hypervisor_callback+0x3d/0x45

-Mathew


On Tue, Aug 25, 2009 at 4:37 PM, James Harper <james.harper@xxxxxxxxxxxxxxxx> wrote:
> Hi ,
>
> I have been trying to use to xenbus_read.
>
> I added the below code in netback.c , static void
net_tx_action(unsigned long
> unused) function.
>
> char * test;
> const char *nodename = "console";
> test = xenbus_read(XBT_NIL, nodename, "limit", NULL);
>
> It is compiling fine. But when the kernel is crashing at this point
during
> runtime.
> I expect to read the /local/domain/0/console/limit , which I am able
to read
> from shell using
> xenstore-read . Am I missing something ?

Not sure how much this helps, but you should not be re-reading from
xenbus every time a packet is sent. That would involve huge per-packet
overheads. You can read it initially and then set a 'watch' on the value
to get notified every time it changes.

Have you got a copy of the crash message?

James


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel