xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	David Vrabel <david.vrabel@citrix.com>
Cc: Jonathan Creekmore <jonathan.creekmore@gmail.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel@lists.xenproject.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH v2] libxenstore: prefer using the character device
Date: Tue, 1 Sep 2015 13:03:27 +0100	[thread overview]
Message-ID: <1441109007.27618.55.camel@citrix.com> (raw)
In-Reply-To: <21989.35784.590403.428570@mariner.uk.xensource.com>

On Tue, 2015-09-01 at 12:28 +0100, Ian Jackson wrote:
> David Vrabel writes ("Re: [Xen-devel] [PATCH v2] libxenstore: prefer 
> using the character device"):
> > On 27/08/15 19:03, Ian Jackson wrote:
> > > I confess I still see this as working around a kernel bug.  Only this
> > > time we are switching from a buggy to non-buggy kernel interface.
> > 
> > /proc/xen/xenbus is deprecated.  The tools should use the non
> > -deprecated
> > interface.
> 
> Why don't we just change it, then ?  What kernels don't provide
> /dev/xen/xenbus ?

It was added by 2fb3683e7b164ee2b324039f7c9d90fe5b1a259b, which looks to be
circa 3.2ish (git describe --contains gave me a stupid answer, so not sure
when it actually hit mainline, 3.2-rc was in Makefile at that commit).

It's perhaps nearly time but I don't think we can quite discard e.g. 3.0
yet and I'm not sure of the status of the forwarded ported classic Xen
kernels.

BTW around the same time /dev/xen/foo replacements were added for most
/proc/xen functionality, e.g. privcmd and xenbus_backend (replacing two
xsd_* I think). Really we ought to be moving over.

> > > > > +	if (access("/dev/xen/xenbus", F_OK) == 0)
> > > > > +		return "/dev/xen/xenbus";
> > > 
> > > Also, previously xs_domain_dev was a function which simply returned a
> > > static value.  I feel vaguely uneasy at putting this kind of
> > > autodetection logic here.
> > 
> > "Vaguely uneasy"?  Are we engineers or witchdoctors?
> 
> It doesn't fit my mental model of what this function is for.  I think
> it would be in better taste would be to arrange to attempt to call
> open() on both strings.  But perhaps that is too much to do at this
> stage of the release.
> 
> > xs_domain_dev() already does a system call to query the environment so
> > it did not just "return a static value":
> 
> getenv is not a system call.
> 
> 
> Anyway, if others don't have similar objections I am not nacking
> this.  It may be applied with Wei's ack.

I've done so, with my Ack as well. thanks.

Ian.

      reply	other threads:[~2015-09-01 12:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 21:44 [PATCH] libxenstore: Use poll() with a non-blocking read() Jonathan Creekmore
2015-08-16  8:59 ` Ian Campbell
2015-08-17  0:46   ` Jonathan Creekmore
2015-08-17 13:44     ` Boris Ostrovsky
2015-08-18  9:48   ` David Vrabel
2015-08-18 14:49     ` Jonathan Creekmore
2015-08-27 14:04     ` [PATCH v2] libxenstore: prefer using the character device Jonathan Creekmore
2015-08-27 16:56       ` Wei Liu
2015-08-27 18:03         ` Ian Jackson
2015-08-27 20:34           ` Jonathan Creekmore
2015-08-28  9:57           ` David Vrabel
2015-08-31 18:59             ` Jonathan Creekmore
2015-09-01 10:56               ` Wei Liu
2015-09-01 11:28             ` Ian Jackson
2015-09-01 12:03               ` Ian Campbell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441109007.27618.55.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=jonathan.creekmore@gmail.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).