[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTinXwE0K5nJ649rhNxN06KvwLNDeCA@mail.gmail.com>
Date: Thu, 9 Jun 2011 15:16:14 +0200
From: Kay Sievers <kay.sievers@...y.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
linux-kernel@...r.kernel.org, Nick Piggin <npiggin@...nel.dk>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@....de>,
Stephen Rothwell <sfr@...b.auug.org.au>,
David Howells <dhowells@...hat.com>,
"Serge E. Hallyn" <serge.hallyn@...onical.com>,
Daniel Lezcano <daniel.lezcano@...e.fr>,
Jiri Slaby <jslaby@...e.cz>,
Greg Kroah-Hartman <gregkh@...e.de>,
James Morris <jmorris@...ei.org>, neilb@...e.de
Subject: Re: [PATCH] sysctl: add support for poll()
On Thu, Jun 9, 2011 at 00:17, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Thu, 2 Jun 2011 19:32:49 +0200
> Kay Sievers <kay.sievers@...y.org> wrote:
>
>> > Nacked-by: "Eric W. Biederman" <ebiederm@...ssion.com>
>>
>> Acked-By: Kay Sievers <kay.sievers@...y.org>
>
> The patch itself doesn't look too bad to me...
>
> 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]
The wait_queue and the change counter needs to be in the same context
as the watched data, so we can probably not really help with generic
proc infrastructure here.
This patch is sysctl infrastructure, which is kind of a subclass of
proc like seq_file is. I have no good idea how to share anything
between them. Unlike the three current users of seq_file, the sysctl
stuff already moved the needed things to the common sysctl code.
If moving the individual event counter to seq_file makes sense, we can
give it a shot, but it don't think it really affects the sysctl case.
Maybe someone has good idea how to unify them, I currently don't have.
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists