Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757742Ab1FINQc (ORCPT ); Thu, 9 Jun 2011 09:16:32 -0400 Received: from mail-yi0-f46.google.com ([209.85.218.46]:42879 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757480Ab1FINQa convert rfc822-to-8bit (ORCPT ); Thu, 9 Jun 2011 09:16:30 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=vrfy.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=EWB30oy1Gmv9aaOAZ/0mmkwO6IMprVSit4ogRYenCLY9+69WJF17QUmqpx1ouzFGN1 2yn7f8M+2Y4dskurPe181xv67Z9W+tZ6p+ZObMgUNDINRZE/e4bueO0WzzngJTW03gpt 1kvoyOwH8L1S4lKhbDYSRUpYmuLhbhHFQoh+M= MIME-Version: 1.0 In-Reply-To: <20110608151732.2b321b9a.akpm@linux-foundation.org> References: <1306930476-1899-1-git-send-email-lucas.demarchi@profusion.mobi> <20110602134338.0c56160e@lxorguk.ukuu.org.uk> <20110608151732.2b321b9a.akpm@linux-foundation.org> From: Kay Sievers Date: Thu, 9 Jun 2011 15:16:14 +0200 Message-ID: Subject: Re: [PATCH] sysctl: add support for poll() To: Andrew Morton Cc: "Eric W. Biederman" , Lucas De Marchi , Alan Cox , linux-kernel@vger.kernel.org, Nick Piggin , Al Viro , Christoph Hellwig , Stephen Rothwell , David Howells , "Serge E. Hallyn" , Daniel Lezcano , Jiri Slaby , Greg Kroah-Hartman , James Morris , neilb@suse.de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1769 Lines: 41 On Thu, Jun 9, 2011 at 00:17, Andrew Morton wrote: > On Thu, 2 Jun 2011 19:32:49 +0200 > Kay Sievers wrote: > >> > Nacked-by: "Eric W. Biederman" >> >> Acked-By: Kay Sievers > > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/