the real needs of just_schedule
there are some situations which really need a just schedule,
with int return value; and this should be moved into lib/ in the future. Signed-off-by: Denis Cheng <crquan@gmail.com> --- fs/inode.c | 2 +- include/linux/writeback.h | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index bf64781..b355a44 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1291,7 +1291,7 @@ int inode_needs_sync(struct inode *inode) EXPORT_SYMBOL(inode_needs_sync); -int inode_wait(void *word) +int just_schedule(void *word) { schedule(); return 0; diff --git a/include/linux/writeback.h b/include/linux/writeback.h index f462439..80ff5eb 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -67,23 +67,31 @@ struct writeback_control { /* * fs/fs-writeback.c - */ + */ void writeback_inodes(struct writeback_control *wbc); -int inode_wait(void *); void sync_inodes_sb(struct super_block *, int wait); void sync_inodes(int wait); +/* + * fs/inode.c + * + * there are some situations which really need a just schedule, + * with int return value; + * and this should be moved into lib/ in the future. + */ +int just_schedule(void *); + /* writeback.h requires fs.h; it, too, is not included from here. */ static inline void wait_on_inode(struct inode *inode) { might_sleep(); - wait_on_bit(&inode->i_state, __I_LOCK, inode_wait, + wait_on_bit(&inode->i_state, __I_LOCK, just_schedule, TASK_UNINTERRUPTIBLE); } static inline void inode_sync_wait(struct inode *inode) { might_sleep(); - wait_on_bit(&inode->i_state, __I_SYNC, inode_wait, + wait_on_bit(&inode->i_state, __I_SYNC, just_schedule, TASK_UNINTERRUPTIBLE); } -- 1.5.5.1 |
the real needs of just_schedule
Hi,
On Wed, 2008-05-07 at 01:51 +0800, Denis Cheng wrote: > there are some situations which really need a just schedule, > with int return value; > and this should be moved into lib/ in the future. > > Signed-off-by: Denis Cheng <crquan@gmail.com> > --- > fs/inode.c | 2 +- > include/linux/writeback.h | 16 ++++++++++++---- > 2 files changed, 13 insertions(+), 5 deletions(-) > > diff --git a/fs/inode.c b/fs/inode.c > index bf64781..b355a44 100644 > --- a/fs/inode.c > +++ b/fs/inode.c > @@ -1291,7 +1291,7 @@ int inode_needs_sync(struct inode *inode) > > EXPORT_SYMBOL(inode_needs_sync); > > -int inode_wait(void *word) > +int just_schedule(void *word) > { > schedule(); > return 0; > diff --git a/include/linux/writeback.h b/include/linux/writeback.h > index f462439..80ff5eb 100644 > --- a/include/linux/writeback.h > +++ b/include/linux/writeback.h > @@ -67,23 +67,31 @@ struct writeback_control { > > /* > * fs/fs-writeback.c > - */ > + */ > void writeback_inodes(struct writeback_control *wbc); > -int inode_wait(void *); > void sync_inodes_sb(struct super_block *, int wait); > void sync_inodes(int wait); > > +/* > + * fs/inode.c > + * > + * there are some situations which really need a just schedule, > + * with int return value; > + * and this should be moved into lib/ in the future. > + */ > +int just_schedule(void *); > + Why is now not a good time? :-) The patches look ok to me otherwise, but I wonder whether I should put them in my tree (since they affect core code) or whether they'd be better in -mm and/or linux-next? Steve. |
the real needs of just_schedule
On Thu, May 8, 2008 at 9:11 PM, Steven Whitehouse <swhiteho@redhat.com> wrote:
> Hi, > > On Wed, 2008-05-07 at 01:51 +0800, Denis Cheng wrote: > > there are some situations which really need a just schedule, > > with int return value; > > and this should be moved into lib/ in the future. > > > > Signed-off-by: Denis Cheng <crquan@gmail.com> > > --- > > fs/inode.c | 2 +- > > include/linux/writeback.h | 16 ++++++++++++---- > > 2 files changed, 13 insertions(+), 5 deletions(-) > > > > diff --git a/fs/inode.c b/fs/inode.c > > index bf64781..b355a44 100644 > > --- a/fs/inode.c > > +++ b/fs/inode.c > > @@ -1291,7 +1291,7 @@ int inode_needs_sync(struct inode *inode) > > > > EXPORT_SYMBOL(inode_needs_sync); > > > > -int inode_wait(void *word) > > +int just_schedule(void *word) > > { > > schedule(); > > return 0; > > diff --git a/include/linux/writeback.h b/include/linux/writeback.h > > index f462439..80ff5eb 100644 > > --- a/include/linux/writeback.h > > +++ b/include/linux/writeback.h > > @@ -67,23 +67,31 @@ struct writeback_control { > > > > /* > > * fs/fs-writeback.c > > - */ > > + */ > > void writeback_inodes(struct writeback_control *wbc); > > -int inode_wait(void *); > > void sync_inodes_sb(struct super_block *, int wait); > > void sync_inodes(int wait); > > > > +/* > > + * fs/inode.c > > + * > > + * there are some situations which really need a just schedule, > > + * with int return value; > > + * and this should be moved into lib/ in the future. > > + */ > > +int just_schedule(void *); > > + > Why is now not a good time? :-) > > The patches look ok to me otherwise, but I wonder whether I should put > them in my tree (since they affect core code) or whether they'd be > better in -mm and/or linux-next? The inode_wait in fs core code(fs/inode.c) is really just_schedule, so is the gdlm_ast_wait, and they are all fs related code; But inode_wait is not a better name for its work, instead just_schedule won. So I should ask for opinions from fs core crew, BTW, today I did a grep among the whole kernel tree and found that just_schedule is also useful to other code, such as: key_wait_bit(security/keys/request_key.c:25) It's also really a just_schedule. So just_schedule should go to lib/ ? Or we just append it into kernel/sched.c? > > Steve. -- Denis Cheng |
| All times are GMT. The time now is 07:36 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.