public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, jsquyres@cisco.com, rostedt@goodmis.org
Subject: Re: [PATCH v2] ummunotify: Userspace support for MMU notifications
Date: Tue, 28 Jul 2009 09:14:40 -0700	[thread overview]
Message-ID: <adaws5szswf.fsf@cisco.com> (raw)
In-Reply-To: <20090727165329.4acfda1c.akpm@linux-foundation.org> (Andrew Morton's message of "Mon, 27 Jul 2009 16:53:29 -0700")


 > > +config UMMUNOTIFY
 > > +       tristate "Userspace MMU notifications"
 > > +       select MMU_NOTIFIER

 > Does `select' dtrt here if UMMUNOTIFY=m?  I never trust it...

Yes, it appears to when I test... and all the other users (KVM, SGI_GRU)
of MMU_NOTIFIER are tristates that select it, so in practice it seems to
work as well.

 > <searches in vain for ummunotify.txt>
 > 
 > Oh well :(
 > 
 > A little test app would be nice - I assume you have one.  We could toss
 > in in the tree as a how-to-use example, and people could perhaps turn
 > it into a regression test - perhaps the LTP people would take it.

I'll write up a bit of doc and stick it in Documentation/ummunotify.txt,
and create samples/ummunotify/ as well for the next iteration.

 > > +			if (test_bit(UMMUNOTIFY_FLAG_HINT, &reg->flags)) {
 > > +				clear_bit(UMMUNOTIFY_FLAG_HINT, &reg->flags);
 > > +			} else {
 > > +				set_bit(UMMUNOTIFY_FLAG_HINT, &reg->flags);

 > It's a shame that change_bit() didn't return the old (or new) value.

Heh, I didn't know about change_bit().  <looks> ... seems like
test_and_change_bit() is exactly what would fit here.  Will update.

 > The overall userspace interface seems a bit klunky, but I can't really
 > suggest anything better.  Netlink delivery?

I took a quick look at netlink but discarded the idea when I saw that
netlink sockets don't support mmap() ... seems that plumbing in mmap
support (to handle the kernel exported generation count) is probably
more trouble than it's worth, and I'm not sure that all the netlink
encapsulation is that much of a win here anyway.  I'd prefer to proceed
with the "virtual character device" interface -- another option would be
sys_ummunotify_create and sys_ummunotify_ctl but I can't really imagine
this being worth another couple syscalls.

 - R.

  reply	other threads:[~2009-07-28 16:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 17:47 [PATCH/RFC] ummunot: Userspace support for MMU notifications Roland Dreier
2009-07-22 18:15 ` Andrew Morton
2009-07-22 19:27   ` Roland Dreier
2009-07-22 19:42     ` Andrew Morton
2009-07-23  2:26       ` Steven Rostedt
2009-07-23 20:21         ` Roland Dreier
2009-07-24  0:25           ` Steven Rostedt
2009-07-24 22:56       ` [PATCH v2] ummunotify: " Roland Dreier
2009-07-27 23:53         ` Andrew Morton
2009-07-28 16:14           ` Roland Dreier [this message]
2009-07-31 18:54             ` [PATCH v3] " Roland Dreier
2009-08-02 19:59               ` Brice Goglin
2009-08-03  4:55                 ` Roland Dreier
2009-08-03  6:57                   ` Brice Goglin
2009-08-04 17:14                     ` Roland Dreier
2009-07-23  9:04     ` [PATCH/RFC] ummunot: " Li Zefan
2009-07-23 20:28       ` Roland Dreier

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=adaws5szswf.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=akpm@linux-foundation.org \
    --cc=jsquyres@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.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