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: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] how to read value from xenstore inside kernel
From: Kuriakose Mathew <kmathew123@xxxxxxxxx>
Date: Tue, 25 Aug 2009 18:14:46 +0530
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Tue, 25 Aug 2009 05:45:13 -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=bSBNHZZnKuMeXzhWkaFZAuNISMlcp4XHqiL9nvrtfkE=; b=JYjhwFiEzYAC1hkDb17Nyq3H4T9bAulmm8/WdM6vgHCu2YphhKm2dIa6uheKoMo3oi RqNOAFtpoOYKcM+iGH4mb8H47B4ke+SUFCLximD7GwNPZ43Ir986GucrW8lFnTBPZvvT g9V/KG6M7i61hkO6GeTmNUjQcnEqGZJqn/M+c=
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=Uxarc69pOg/DE9YYRgloF5caiOYVDuowwV5TrxVM7UdYuX6y/Y6TjNpUo/B17AorN1 T53Zo6KlKiu6dzMnxj57mN3eRAwuR7TodfZNRzi8hRNH0wW3xwGSM3dfGXDDeavp3FAz 5rI7rV8aeo58Sa09YTFLXC8K3Q0Hvi9HxVNms=
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
Thanks James.
I will try to get the crash message but not how to get it in a file. When I restart the system after making the change, it gets rebooted at this point. So I have to find a way to get those message displayed while a system is booting. I ll try to get it.

Also regarding 'watch' , it is called when the value of key changes but if I want to read some value which is static then will this help?
Not sure if I am right.


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
> 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