[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: James Harper <james.harper@xxxxxxxxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.