linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write()
@ 2009-08-25 22:18 Vincent Li
  2009-08-25 22:22 ` Christoph Hellwig
  2009-10-16 18:43 ` [PATCH] mm/vmscan: change comment generic_file_write to __generic_file_aio_write Vincent Li
  0 siblings, 2 replies; 7+ messages in thread
From: Vincent Li @ 2009-08-25 22:18 UTC (permalink / raw)
  To: linux-mm; +Cc: Badari Pulavarty, Andrew Morton, Christoph Hellwig, Vincent Li

Commit 543ade1fc9 (Streamline generic_file_* interfaces and filemap cleanups)
removed generic_file_write() in filemap. For consistency, change the comment in
vmscan pageout() to do_sync_write().

Signed-off-by: Vincent Li <macli@brc.ubc.ca>
---
 mm/vmscan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1219ceb..5e03c22 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -358,7 +358,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
 	 * stalls if we need to run get_block().  We could test
 	 * PagePrivate for that.
 	 *
-	 * If this process is currently in generic_file_write() against
+	 * If this process is currently in do_sync_write() against
 	 * this page's queue, we can perform writeback even if that
 	 * will block.
 	 *
-- 
1.6.0.4

--
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 related	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write()
  2009-08-25 22:18 [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write() Vincent Li
@ 2009-08-25 22:22 ` Christoph Hellwig
  2009-08-25 22:45   ` Vincent Li
  2009-10-16 18:43 ` [PATCH] mm/vmscan: change comment generic_file_write to __generic_file_aio_write Vincent Li
  1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2009-08-25 22:22 UTC (permalink / raw)
  To: Vincent Li; +Cc: linux-mm, Badari Pulavarty, Andrew Morton, Christoph Hellwig

On Tue, Aug 25, 2009 at 03:18:08PM -0700, Vincent Li wrote:
> Commit 543ade1fc9 (Streamline generic_file_* interfaces and filemap cleanups)
> removed generic_file_write() in filemap. For consistency, change the comment in
> vmscan pageout() to do_sync_write().

I think the right replacement would be __generic_file_aio_write.  But
from a quick glance over the code don't have the slightest idea what it
is referring to.

--
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] 7+ messages in thread

* Re: [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write()
  2009-08-25 22:22 ` Christoph Hellwig
@ 2009-08-25 22:45   ` Vincent Li
  2009-08-25 22:50     ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Vincent Li @ 2009-08-25 22:45 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Vincent Li, linux-mm, Badari Pulavarty, Andrew Morton

On Wed, 26 Aug 2009, Christoph Hellwig wrote:

> On Tue, Aug 25, 2009 at 03:18:08PM -0700, Vincent Li wrote:
> > Commit 543ade1fc9 (Streamline generic_file_* interfaces and filemap cleanups)
> > removed generic_file_write() in filemap. For consistency, change the comment in
> > vmscan pageout() to do_sync_write().
> 
> I think the right replacement would be __generic_file_aio_write.  But

There is no __generic_file_aio_write, but __generic_file_aio_write_nolock, 
generic_file_aio_write and generic_file_aio_write_nolock. 

I read the commit 543ade1fc9, it seems it replaced all .write = generic_file_write to 
.write = do_sync_write. I thought they are the same.

> from a quick glance over the code don't have the slightest idea what it
> is referring to.

I read the code  over and over again, still no clue about the comment :-(. 

Vincent Li
Biomedical Research Center
University of British Columbia

--
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] 7+ messages in thread

* Re: [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write()
  2009-08-25 22:45   ` Vincent Li
@ 2009-08-25 22:50     ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2009-08-25 22:50 UTC (permalink / raw)
  To: Vincent Li; +Cc: Christoph Hellwig, linux-mm, Badari Pulavarty, Andrew Morton

On Tue, Aug 25, 2009 at 03:45:44PM -0700, Vincent Li wrote:
> There is no __generic_file_aio_write, but __generic_file_aio_write_nolock, 
> generic_file_aio_write and generic_file_aio_write_nolock. 

Indeed right now there is, but it gets renamed to
__generic_file_aio_write in a patchset queued up ;-)

> 
> I read the commit 543ade1fc9, it seems it replaced all .write = generic_file_write to 
> .write = do_sync_write. I thought they are the same.

That's true.  But do_sync_write is just a wrapper waiting for the
.aio_write method, for which the generic_file_write equivalent is
generic_file_aio_writev which calls into the above fuction.

--
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] 7+ messages in thread

* Re: [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write()
       [not found] <8acda98c0908260507s7b813292i54b2d782cbfaadfe@mail.gmail.com>
@ 2009-08-26 18:17 ` Vincent Li
  2009-08-26 18:26   ` Nikita Danilov
  0 siblings, 1 reply; 7+ messages in thread
From: Vincent Li @ 2009-08-26 18:17 UTC (permalink / raw)
  To: Nikita Danilov
  Cc: Christoph Hellwig, linux-mm, Vincent Li, Badari Pulavarty,
	Andrew Morton

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1804 bytes --]

On Wed, 26 Aug 2009, Nikita Danilov wrote:

> Vincent Li <macli@brc.ubc.ca> writes:
> 
> > On Wed, 26 Aug 2009, Christoph Hellwig wrote:
> >
> >> On Tue, Aug 25, 2009 at 03:18:08PM -0700, Vincent Li wrote:
> >> > Commit 543ade1fc9 (Streamline generic_file_* interfaces and filemap cleanups)
> >> > removed generic_file_write() in filemap. For consistency, change the comment in
> >> > vmscan pageout() to do_sync_write().
> >>
> >> I think the right replacement would be __generic_file_aio_write.  But
> >
> > There is no __generic_file_aio_write, but __generic_file_aio_write_nolock,
> > generic_file_aio_write and generic_file_aio_write_nolock.
> >
> > I read the commit 543ade1fc9, it seems it replaced all .write = generic_file_write to
> > .write = do_sync_write. I thought they are the same.
> >
> >> from a quick glance over the code don't have the slightest idea what it
> >> is referring to.
> >
> > I read the code  over and over again, still no clue about the comment :-(.
> 
> This comment is about (bdi == current->backing_dev_info) condition in may_write_to_queue(),
> checking against
> 
>     /* We can write back this queue in page reclaim */
>     current->backing_dev_info = mapping->backing_dev_info;
> 
> bit (that used to be?) in __generic_file_aio_write_nolock()
> 
> Thank you,
> Nikita.

Thank you for the explaintion!

	* If this process is currently in generic_file_write() against
	* this page's queue, we can perform writeback even if that
	* will block.

So my interpretation for the comment is that if the current process is 
already in __generic_file_aio_write against the page's queue, The page 
claim path code can still perfom writeback even if the __generic_file_aio_write 
will block. Am I right?


Vincent Li
Biomedical Research Center
University of British Columbia

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write()
  2009-08-26 18:17 ` [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write() Vincent Li
@ 2009-08-26 18:26   ` Nikita Danilov
  0 siblings, 0 replies; 7+ messages in thread
From: Nikita Danilov @ 2009-08-26 18:26 UTC (permalink / raw)
  To: Vincent Li; +Cc: Christoph Hellwig, linux-mm, Badari Pulavarty, Andrew Morton

2009/8/26 Vincent Li <macli@brc.ubc.ca>

[...]

> Thank you for the explaintion!
>
>        * If this process is currently in generic_file_write() against
>        * this page's queue, we can perform writeback even if that
>        * will block.
>
> So my interpretation for the comment is that if the current process is
> already in __generic_file_aio_write against the page's queue, The page
> claim path code can still perfom writeback even if the __generic_file_aio_write
> will block. Am I right?

Yes. The idea is that a heavy writer causing a lot of page allocations
should wait for the queue to drain, thus throttling itself; while a
thread that triggeres direct reclaim occasionally (i.e., not from the
main write path) shouldn't be blocked on the transput incurred by
somebody else.

Nikita.

>
>
>
> Vincent Li
> Biomedical Research Center
> University of British Columbia

--
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] 7+ messages in thread

* [PATCH] mm/vmscan: change comment generic_file_write to __generic_file_aio_write
  2009-08-25 22:18 [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write() Vincent Li
  2009-08-25 22:22 ` Christoph Hellwig
@ 2009-10-16 18:43 ` Vincent Li
  1 sibling, 0 replies; 7+ messages in thread
From: Vincent Li @ 2009-10-16 18:43 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-mm, Andrew Morton


Commit 543ade1fc9 (Streamline generic_file_* interfaces and filemap cleanups)
removed generic_file_write() in filemap. Change the comment in vmscan
pageout() to __generic_file_aio_write().

Signed-off-by: Vincent Li <macli@brc.ubc.ca>
---
 mm/vmscan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 64e4388..34ed10f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -358,7 +358,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
 	 * stalls if we need to run get_block().  We could test
 	 * PagePrivate for that.
 	 *
-	 * If this process is currently in generic_file_write() against
+	 * If this process is currently in __generic_file_aio_write() against
 	 * this page's queue, we can perform writeback even if that
 	 * will block.
 	 *
-- 
1.6.0.4

--
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 related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-16 18:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 22:18 [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write() Vincent Li
2009-08-25 22:22 ` Christoph Hellwig
2009-08-25 22:45   ` Vincent Li
2009-08-25 22:50     ` Christoph Hellwig
2009-10-16 18:43 ` [PATCH] mm/vmscan: change comment generic_file_write to __generic_file_aio_write Vincent Li
     [not found] <8acda98c0908260507s7b813292i54b2d782cbfaadfe@mail.gmail.com>
2009-08-26 18:17 ` [PATCH] mm/vmscan: change generic_file_write() comment to do_sync_write() Vincent Li
2009-08-26 18:26   ` Nikita Danilov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).