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/
Home Products Support Community News


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

To: "Kuriakose Mathew" <kmathew123@xxxxxxxxx>, "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>
Subject: RE: [Xen-devel] how to read value from xenstore inside kernel
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Tue, 25 Aug 2009 21:07:01 +1000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 25 Aug 2009 04:07:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9e81bde0908250357j5678af58ob56633561bf5a2bb@xxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acolcz3hbJuRXlf8Qby/Gu1vNK2omAAAID7w
Thread-topic: [Xen-devel] how to read value from xenstore inside kernel
> 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
> 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?


Xen-devel mailing list