* NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages?
@ 2007-04-28 1:21 Ethan Solomita
2007-04-29 20:22 ` Trond Myklebust
0 siblings, 1 reply; 5+ messages in thread
From: Ethan Solomita @ 2007-04-28 1:21 UTC (permalink / raw)
To: LKML, linux-mm
sync_inodes_sb()
balance_dirty_pages()
wakeup_pdflush()
wb_kupdate()
prefetch_suitable()
I can trace a standard codepath where it seems both of these are set
on the same page:
nfs_file_aops.commit_write ->
nfs_commit_write
nfs_updatepages
nfs_writepage_setup
nfs_wb_page
nfs_wb_page_priority
nfs_writepage_locked
nfs_flush_mapping
nfs_flush_list
nfs_flush_multi
nfs_write_partial_ops.rpc_call_done
nfs_writeback_done_partial
nfs_writepage_release
nfs_reschedule_unstable_write
nfs_mark_request_commit
incr NR_UNSTABLE_NFS
nfs_file_aops.commit_write ->
nfs_commit_write
nfs_updatepage
__set_page_dirty_nobuffers
incr NF_FILE_DIRTY
This is the standard code path that derives from sys_write(). Can
someone either show how this code sequence can't happen, or confirm for
me that there's a bug?
-- Ethan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages?
2007-04-28 1:21 NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages? Ethan Solomita
@ 2007-04-29 20:22 ` Trond Myklebust
2007-04-30 0:26 ` Ethan Solomita
0 siblings, 1 reply; 5+ messages in thread
From: Trond Myklebust @ 2007-04-29 20:22 UTC (permalink / raw)
To: Ethan Solomita; +Cc: LKML, linux-mm
On Fri, 2007-04-27 at 18:21 -0700, Ethan Solomita wrote:
> There are several places where we add together NR_UNSTABLE_FS and
> NF_FILE_DIRTY:
>
> sync_inodes_sb()
> balance_dirty_pages()
> wakeup_pdflush()
> wb_kupdate()
> prefetch_suitable()
>
> I can trace a standard codepath where it seems both of these are set
> on the same page:
>
> nfs_file_aops.commit_write ->
> nfs_commit_write
> nfs_updatepages
> nfs_writepage_setup
> nfs_wb_page
> nfs_wb_page_priority
> nfs_writepage_locked
> nfs_flush_mapping
> nfs_flush_list
> nfs_flush_multi
> nfs_write_partial_ops.rpc_call_done
> nfs_writeback_done_partial
> nfs_writepage_release
> nfs_reschedule_unstable_write
> nfs_mark_request_commit
> incr NR_UNSTABLE_NFS
>
> nfs_file_aops.commit_write ->
> nfs_commit_write
> nfs_updatepage
> __set_page_dirty_nobuffers
> incr NF_FILE_DIRTY
>
>
> This is the standard code path that derives from sys_write(). Can
> someone either show how this code sequence can't happen, or confirm for
> me that there's a bug?
> -- Ethan
It should not happen. If the page is on the unstable list, then it will
be committed before nfs_updatepage is allowed to redirty it. See the
recent fixes in 2.6.21-rc7.
Trond
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages?
2007-04-29 20:22 ` Trond Myklebust
@ 2007-04-30 0:26 ` Ethan Solomita
2007-04-30 1:15 ` Ethan Solomita
2007-04-30 1:51 ` Trond Myklebust
0 siblings, 2 replies; 5+ messages in thread
From: Ethan Solomita @ 2007-04-30 0:26 UTC (permalink / raw)
To: Trond Myklebust; +Cc: LKML, linux-mm
Trond Myklebust wrote:
> On Fri, 2007-04-27 at 18:21 -0700, Ethan Solomita wrote:
>> There are several places where we add together NR_UNSTABLE_FS and
>> NF_FILE_DIRTY:
>>
>> sync_inodes_sb()
>> balance_dirty_pages()
>> wakeup_pdflush()
>> wb_kupdate()
>> prefetch_suitable()
>>
>> I can trace a standard codepath where it seems both of these are set
>> on the same page:
>>
>> nfs_file_aops.commit_write ->
>> nfs_commit_write
>> nfs_updatepages
>> nfs_writepage_setup
>> nfs_wb_page
>> nfs_wb_page_priority
>> nfs_writepage_locked
>> nfs_flush_mapping
>> nfs_flush_list
>> nfs_flush_multi
>> nfs_write_partial_ops.rpc_call_done
>> nfs_writeback_done_partial
>> nfs_writepage_release
>> nfs_reschedule_unstable_write
>> nfs_mark_request_commit
>> incr NR_UNSTABLE_NFS
>>
>> nfs_file_aops.commit_write ->
>> nfs_commit_write
>> nfs_updatepage
>> __set_page_dirty_nobuffers
>> incr NF_FILE_DIRTY
>>
>>
>> This is the standard code path that derives from sys_write(). Can
>> someone either show how this code sequence can't happen, or confirm for
>> me that there's a bug?
>> -- Ethan
>
> It should not happen. If the page is on the unstable list, then it will
> be committed before nfs_updatepage is allowed to redirty it. See the
> recent fixes in 2.6.21-rc7.
Above I present a codepath called straight from sys_write() which seems
to do what I say. I could be wrong, but can you address the code paths I
show above which seem to set both?
-- Ethan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages?
2007-04-30 0:26 ` Ethan Solomita
@ 2007-04-30 1:15 ` Ethan Solomita
2007-04-30 1:51 ` Trond Myklebust
1 sibling, 0 replies; 5+ messages in thread
From: Ethan Solomita @ 2007-04-30 1:15 UTC (permalink / raw)
To: Ethan Solomita; +Cc: Trond Myklebust, LKML, linux-mm
Ethan Solomita wrote:
> Trond Myklebust wrote:
>>
>> It should not happen. If the page is on the unstable list, then it will
>> be committed before nfs_updatepage is allowed to redirty it. See the
>> recent fixes in 2.6.21-rc7.
>
> Above I present a codepath called straight from sys_write() which
> seems to do what I say. I could be wrong, but can you address the code
> paths I show above which seem to set both?
Sorry about my quick reply, I'd misunderstood what you were saying.
I'll take a look at what you say.
Thanks,
-- Ethan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages?
2007-04-30 0:26 ` Ethan Solomita
2007-04-30 1:15 ` Ethan Solomita
@ 2007-04-30 1:51 ` Trond Myklebust
1 sibling, 0 replies; 5+ messages in thread
From: Trond Myklebust @ 2007-04-30 1:51 UTC (permalink / raw)
To: Ethan Solomita; +Cc: LKML, linux-mm
On Sun, 2007-04-29 at 17:26 -0700, Ethan Solomita wrote:
> Trond Myklebust wrote:
> > On Fri, 2007-04-27 at 18:21 -0700, Ethan Solomita wrote:
> >> There are several places where we add together NR_UNSTABLE_FS and
> >> NF_FILE_DIRTY:
> >>
> >> sync_inodes_sb()
> >> balance_dirty_pages()
> >> wakeup_pdflush()
> >> wb_kupdate()
> >> prefetch_suitable()
> >>
> >> I can trace a standard codepath where it seems both of these are set
> >> on the same page:
> >>
> >> nfs_file_aops.commit_write ->
> >> nfs_commit_write
> >> nfs_updatepages
> >> nfs_writepage_setup
> >> nfs_wb_page
> >> nfs_wb_page_priority
> >> nfs_writepage_locked
> >> nfs_flush_mapping
> >> nfs_flush_list
> >> nfs_flush_multi
> >> nfs_write_partial_ops.rpc_call_done
> >> nfs_writeback_done_partial
> >> nfs_writepage_release
> >> nfs_reschedule_unstable_write
> >> nfs_mark_request_commit
> >> incr NR_UNSTABLE_NFS
> >>
> >> nfs_file_aops.commit_write ->
> >> nfs_commit_write
> >> nfs_updatepage
> >> __set_page_dirty_nobuffers
> >> incr NF_FILE_DIRTY
> >>
> >>
> >> This is the standard code path that derives from sys_write(). Can
> >> someone either show how this code sequence can't happen, or confirm for
> >> me that there's a bug?
> >> -- Ethan
> >
> > It should not happen. If the page is on the unstable list, then it will
> > be committed before nfs_updatepage is allowed to redirty it. See the
> > recent fixes in 2.6.21-rc7.
>
> Above I present a codepath called straight from sys_write() which seems
> to do what I say. I could be wrong, but can you address the code paths I
> show above which seem to set both?
> -- Ethan
Look carefully at nfs_update_request(): if !nfs_dirty_request(), then it
returns -EBUSY, and so nfs_writepage_setup() will loop on nfs_wb_page().
IOW: if PG_NEED_COMMIT is set (which it should be if on the commit list)
then nfs_writepage_setup() will loop...
Trond
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-04-30 1:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-28 1:21 NR_UNSTABLE_FS vs. NR_FILE_DIRTY: double counting pages? Ethan Solomita
2007-04-29 20:22 ` Trond Myklebust
2007-04-30 0:26 ` Ethan Solomita
2007-04-30 1:15 ` Ethan Solomita
2007-04-30 1:51 ` Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox