Prev: Power management minisummit at LPC
Next: xstat: Make special system filesystems return FS_SPECIAL_FL [ver #6]
From: Johannes Weiner on 21 Jul 2010 10:50 On Wed, Jul 21, 2010 at 03:31:19PM +0100, Mel Gorman wrote: > On Wed, Jul 21, 2010 at 04:28:44PM +0200, Johannes Weiner wrote: > > On Wed, Jul 21, 2010 at 02:38:57PM +0100, Mel Gorman wrote: > > > @@ -858,7 +872,7 @@ keep: > > > > > > free_page_list(&free_pages); > > > > > > - list_splice(&ret_pages, page_list); > > > > This will lose all retry pages forever, I think. > > > > Above this is > > while (!list_empty(page_list)) { > ... > } > > page_list should be empty and keep_locked is putting the pages on ret_pages > already so I think it's ok. But ret_pages is function-local. Putting them back on the then-empty page_list is to give them back to the caller, otherwise they are lost in a dead stack slot. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: KAMEZAWA Hiroyuki on 21 Jul 2010 20:10 On Wed, 21 Jul 2010 15:27:10 +0100 Mel Gorman <mel(a)csn.ul.ie> wrote: > On Wed, Jul 21, 2010 at 09:01:11PM +0900, KAMEZAWA Hiroyuki wrote: > > But, hmm, memcg will have to select to enter this rounine based on > > the result of 1st memory reclaim. > > > > It has the option of igoring pages being dirtied but I worry that the > container could be filled with dirty pages waiting for flushers to do > something. I'll prepare dirty_ratio for memcg. It's not easy but requested by I/O cgroup guys, too... > > > > > > > - /* > > > - * The attempt at page out may have made some > > > - * of the pages active, mark them inactive again. > > > - */ > > > - nr_active = clear_active_flags(&page_list, NULL); > > > - count_vm_events(PGDEACTIVATE, nr_active); > > > + while (nr_reclaimed < nr_taken && nr_dirty && dirty_retry--) { > > > + wakeup_flusher_threads(laptop_mode ? 0 : nr_dirty); > > > + congestion_wait(BLK_RW_ASYNC, HZ/10); > > > > > > > Congestion wait is required ?? Where the congestion happens ? > > I'm sorry you already have some other trick in other patch. > > > > It's to wait for the IO to occur. > 1 tick penalty seems too large. I hope we can have some waitqueue in future. > > > - nr_reclaimed += shrink_page_list(&page_list, sc, PAGEOUT_IO_SYNC); > > > + /* > > > + * The attempt at page out may have made some > > > + * of the pages active, mark them inactive again. > > > + */ > > > + nr_active = clear_active_flags(&page_list, NULL); > > > + count_vm_events(PGDEACTIVATE, nr_active); > > > + > > > + nr_reclaimed += shrink_page_list(&page_list, sc, > > > + PAGEOUT_IO_SYNC, &nr_dirty); > > > + } > > > > Just a question. This PAGEOUT_IO_SYNC has some meanings ? > > > > Yes, in pageout it will wait on pages currently being written back to be > cleaned before trying to reclaim them. > Hmm. IIUC, this routine is called only when !current_is_kswapd() and pageout is done only whne current_is_kswapd(). So, this seems .... Wrong ? Thanks, -Kame -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: KAMEZAWA Hiroyuki on 22 Jul 2010 05:30 On Thu, 22 Jul 2010 10:19:30 +0100 Mel Gorman <mel(a)csn.ul.ie> wrote: > On Thu, Jul 22, 2010 at 08:57:34AM +0900, KAMEZAWA Hiroyuki wrote: > > On Wed, 21 Jul 2010 15:27:10 +0100 > > Mel Gorman <mel(a)csn.ul.ie> wrote: > > 1 tick penalty seems too large. I hope we can have some waitqueue in future. > > > > congestion_wait() if congestion occurs goes onto a waitqueue that is > woken if congestion clears. I didn't measure it this time around but I > doubt it waits for HZ/10 much of the time. > Okay. > > > > > - nr_reclaimed += shrink_page_list(&page_list, sc, PAGEOUT_IO_SYNC); > > > > > + /* > > > > > + * The attempt at page out may have made some > > > > > + * of the pages active, mark them inactive again. > > > > > + */ > > > > > + nr_active = clear_active_flags(&page_list, NULL); > > > > > + count_vm_events(PGDEACTIVATE, nr_active); > > > > > + > > > > > + nr_reclaimed += shrink_page_list(&page_list, sc, > > > > > + PAGEOUT_IO_SYNC, &nr_dirty); > > > > > + } > > > > > > > > Just a question. This PAGEOUT_IO_SYNC has some meanings ? > > > > > > > > > > Yes, in pageout it will wait on pages currently being written back to be > > > cleaned before trying to reclaim them. > > > > > Hmm. IIUC, this routine is called only when !current_is_kswapd() and > > pageout is done only whne current_is_kswapd(). So, this seems .... > > Wrong ? > > > > Both direct reclaim and kswapd can reach shrink_inactive_list > > Direct reclaim > do_try_to_free_pages > -> shrink_zones > -> shrink_zone > -> shrink_list > -> shrink_inactive list <--- the routine in question > > Kswapd > balance_pgdat > -> shrink_zone > -> shrink_list > -> shrink_inactive_list > > pageout() is still called by direct reclaim if the page is anon so it > will synchronously wait on those if PAGEOUT_IO_SYNC is set. Ah, ok. I missed that. Thank you for kindly clarification. Thanks, -Kame -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
First
|
Prev
|
Pages: 1 2 Prev: Power management minisummit at LPC Next: xstat: Make special system filesystems return FS_SPECIAL_FL [ver #6] |