From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org, Nick Piggin <npiggin@kernel.dk>,
Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>,
Stephen Rothwell <sfr@canb.auug.org.au>,
David Howells <dhowells@redhat.com>,
"Serge E. Hallyn" <serge.hallyn@canonical.com>,
Daniel Lezcano <daniel.lezcano@free.fr>,
Jiri Slaby <jslaby@suse.cz>, Greg Kroah-Hartman <gregkh@suse.de>,
James Morris <jmorris@namei.org>,
neilb@suse.de
Subject: Re: [PATCH] sysctl: add support for poll()
Date: Tue, 14 Jun 2011 00:53:13 -0300 [thread overview]
Message-ID: <20110614035313.GA1229@vigoh> (raw)
In-Reply-To: <1307981153.1449.19.camel@mop>
* Kay Sievers <kay.sievers@vrfy.org> [2011-06-13 18:05:51 +0200]:
> On Thu, 2011-06-09 at 15:16 +0200, Kay Sievers wrote:
> > On Thu, Jun 9, 2011 at 00:17, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > > We already have several pollable procfs files, such as
> > > fs/proc/base.c:mounts_poll() and I think drivers/md has one. I do
> > > think that any work in this area should end up with those custom
> > > make-procfs-pollable hacks being identified and removed.
> >
> > For these files we can probably move the event counter into the
> > seq_file structure, and get rid of the dance to kmalloc it and assign
> > it to seq_file->private. That might simplify the logic a bit.
> >
> > [Adding Neil, to get his opinion of moving 'event' so seq_file and get
> > rid of the malloc dance]
>
> I guess, we could do something like this, which looks quite a bit
> simpler by moving the poll event counter into the dynamically allocated
> seq_file structure itself, instead of having private structures
> allocated on top to just carry the counter (patch is just
> compile-tested).
>
> Thanks,
> Kay
>
> ---
> drivers/md/md.c | 26 ++++++++------------------
> fs/namespace.c | 4 ++--
> fs/proc/base.c | 2 +-
> include/linux/mnt_namespace.h | 1 -
> include/linux/seq_file.h | 1 +
> mm/swapfile.c | 29 ++++++++---------------------
> 6 files changed, 20 insertions(+), 43 deletions(-)
I've successfully tested this on top of 3.0-rc3 for /proc/mounts and
/proc/swaps. I've booted with systemd (that depends on mounts and swaps
being pollable) and created a small test using epoll.
Lucas De Marchi
next prev parent reply other threads:[~2011-06-14 3:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 12:14 [PATCH] sysctl: add support for poll() Lucas De Marchi
2011-06-02 2:51 ` Lucas De Marchi
2011-06-02 3:31 ` Eric W. Biederman
2011-06-02 12:06 ` Kay Sievers
2011-06-02 12:43 ` Alan Cox
2011-06-02 13:01 ` Kay Sievers
2011-06-02 13:02 ` Lucas De Marchi
2011-06-02 13:12 ` Alan Cox
2011-06-02 13:24 ` Kay Sievers
2011-06-02 13:56 ` Eric W. Biederman
2011-06-02 17:32 ` Kay Sievers
2011-06-08 22:17 ` Andrew Morton
2011-06-09 13:16 ` Kay Sievers
2011-06-13 16:05 ` Kay Sievers
2011-06-14 3:53 ` Lucas De Marchi [this message]
2011-06-14 4:17 ` NeilBrown
2011-07-26 2:17 ` Lucas De Marchi
2011-08-02 22:53 ` Kay Sievers
2011-08-02 23:16 ` Greg KH
2011-08-03 1:12 ` Lucas De Marchi
2011-08-03 9:40 ` Eric W. Biederman
2011-08-03 13:17 ` Lucas De Marchi
2011-08-03 18:08 ` Eric W. Biederman
2011-08-03 18:45 ` Lucas De Marchi
2011-08-04 18:57 ` Lucas De Marchi
2011-08-23 17:57 ` Greg KH
2011-08-26 21:06 ` Andrew Morton
2011-06-12 15:34 ` Eric W. Biederman
2011-06-13 14:28 ` Kay Sievers
2011-06-02 14:16 ` Eric W. Biederman
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=20110614035313.GA1229@vigoh \
--to=lucas.demarchi@profusion.mobi \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=daniel.lezcano@free.fr \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=hch@lst.de \
--cc=jmorris@namei.org \
--cc=jslaby@suse.cz \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=npiggin@kernel.dk \
--cc=serge.hallyn@canonical.com \
--cc=sfr@canb.auug.org.au \
--cc=viro@zeniv.linux.org.uk \
/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