All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Paul Jackson <pj@sgi.com>
Cc: pj@sgi.com, greg@kroah.com, ebiederm@xmission.com,
	linux-kernel@vger.kernel.org, yanmin.zhang@intel.com,
	Neil Brown <neilb@cse.unsw.edu.au>
Subject: Re: + proc-dont-lock-task_structs-indefinitely-cpuset-fix-2.patch added to -mm tree
Date: Wed, 1 Mar 2006 20:20:58 -0800	[thread overview]
Message-ID: <20060301202058.42975408.akpm@osdl.org> (raw)
In-Reply-To: <20060301154040.a7cb2afd.pj@sgi.com>

Paul Jackson <pj@sgi.com> wrote:
>
> Andrew wrote:
>  > But Paul bisected it down to a particular not-merged patch,
>  > gregkh-driver-allow-sysfs-attribute-files-to-be-pollable.patch, which I'll
>  > admit doesn't look like it'll cause this.
> 
>  Verified.

All very strange.  afaict that patch is a no-op.  The changelog claims that
"This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
to be pollable", except that part is AWOL.

It'd be interesting to see if just the data structure expansion:

--- gregkh-2.6.orig/fs/sysfs/file.c
+++ gregkh-2.6/fs/sysfs/file.c
@@ -6,6 +6,7 @@
 #include <linux/fsnotify.h>
 #include <linux/kobject.h>
 #include <linux/namei.h>
+#include <linux/poll.h>
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 
@@ -57,6 +58,7 @@ struct sysfs_buffer {
 	struct sysfs_ops	* ops;
 	struct semaphore	sem;
 	int			needs_read_fill;
+	int			event;
 };
 
 
--- gregkh-2.6.orig/include/linux/kobject.h
+++ gregkh-2.6/include/linux/kobject.h
@@ -24,6 +24,7 @@
 #include <linux/rwsem.h>
 #include <linux/kref.h>
 #include <linux/kernel.h>
+#include <linux/wait.h>
 #include <asm/atomic.h>
 
 #define KOBJ_NAME_LEN			20
@@ -56,6 +57,7 @@ struct kobject {
 	struct kset		* kset;
 	struct kobj_type	* ktype;
 	struct dentry		* dentry;
+	wait_queue_head_t	poll;
 };
 
 extern int kobject_set_name(struct kobject *, const char *, ...)
--- gregkh-2.6.orig/include/linux/sysfs.h
+++ gregkh-2.6/include/linux/sysfs.h
@@ -74,6 +74,7 @@ struct sysfs_dirent {
 	umode_t			s_mode;
 	struct dentry		* s_dentry;
 	struct iattr		* s_iattr;
+	atomic_t		s_event;
 };
 
 #define SYSFS_ROOT		0x0001


is sufficient to break it.


Somewhat OT, but why is that patch dinking around with the attribute's
\x10parent directory?  Why not just poll the attribute's sysfs file directly? 
<xenuflects>.  Possibly because we want the poller to be woken when an
attribute actually gets instantiated within the directory??  Dunno.

And it's a bit sad that poll() on an unpollable attribute will just hang. 
One would expect poll() to come back with -EINVAL.

  reply	other threads:[~2006-03-02  4:31 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200603010120.k211KqVP009559@shell0.pdx.osdl.net>
2006-03-01  2:18 ` + proc-dont-lock-task_structs-indefinitely-cpuset-fix-2.patch added to -mm tree Paul Jackson
2006-03-01  2:36   ` Andrew Morton
2006-03-01  3:45     ` Paul Jackson
2006-03-01  4:10       ` Paul Jackson
2006-03-01  5:05         ` Eric W. Biederman
2006-03-01  5:25           ` Paul Jackson
2006-03-01  6:11             ` Eric W. Biederman
2006-03-01  6:15               ` Eric W. Biederman
2006-03-01  7:20             ` [PATCH] proc: Reference couting fix Eric W. Biederman
2006-03-01  7:26             ` [PATCH] proc: task_mmu bug fix Eric W. Biederman
2006-03-01  7:46               ` Andrew Morton
2006-03-01 12:49                 ` Eric W. Biederman
2006-03-01 13:14                   ` Hugh Dickins
2006-03-01 13:15                   ` Rafael J. Wysocki
2006-03-01 18:33                 ` Paul Jackson
2006-03-01  7:48             ` + proc-dont-lock-task_structs-indefinitely-cpuset-fix-2.patch added to -mm tree Paul Jackson
2006-03-01  8:26               ` Andrew Morton
2006-03-01  8:39                 ` Paul Jackson
2006-03-01  9:53                 ` Paul Jackson
2006-03-01 10:02                   ` Andrew Morton
2006-03-01 10:14                     ` Paul Jackson
2006-03-01 10:11                   ` Paul Jackson
2006-03-01 10:31                     ` Paul Jackson
2006-03-01 19:21                   ` Greg KH
2006-03-01 20:58                     ` Paul Jackson
2006-03-01 21:30                       ` Greg KH
2006-03-01 22:26                         ` Andrew Morton
2006-03-01 22:50                           ` Greg KH
2006-03-01 23:20                             ` Paul Jackson
2006-03-01 23:40                               ` Andrew Morton
2006-03-02  0:10                                 ` Paul Jackson
2006-03-02  0:35                                   ` Paul Jackson
2006-03-01 23:10                           ` Paul Jackson
2006-03-01 23:40                             ` Paul Jackson
2006-03-02  4:20                               ` Andrew Morton [this message]
2006-03-02  6:14                                 ` Paul Jackson
2006-03-02  7:42                                   ` Andrew Morton
2006-03-02 19:12                                     ` Paul Jackson
2006-03-02 21:52                                       ` Andrew Morton
2006-03-03  6:33                                         ` Paul Jackson
2006-03-03  6:44                                           ` Andrew Morton
2006-03-01  4:31       ` Eric W. Biederman
2006-03-01  4:58         ` Paul Jackson

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=20060301202058.42975408.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=pj@sgi.com \
    --cc=yanmin.zhang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.