login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
8
Re: [PATCH v4 2/7] deactivate invalidated pages
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: KAMEZAWA Hiroyuki
Subject:
Re: [PATCH v4 2/7] deactivate invalidated pages
Date: Tuesday, December 7, 2010 - 5:56 pm
On Wed, 8 Dec 2010 07:51:25 +0900 Minchan Kim <minchan.kim@gmail.com> wrote:
quoted text
> On Wed, Dec 8, 2010 at 12:56 AM, Johannes Weiner <hannes@cmpxchg.org> wrote: > > On Wed, Dec 08, 2010 at 12:26:25AM +0900, Minchan Kim wrote: > >> On Tue, Dec 07, 2010 at 04:19:39PM +0100, Johannes Weiner wrote: > >> > On Wed, Dec 08, 2010 at 12:07:10AM +0900, Minchan Kim wrote: > >> > > On Tue, Dec 07, 2010 at 03:49:24PM +0100, Johannes Weiner wrote: > >> > > > On Mon, Dec 06, 2010 at 02:29:10AM +0900, Minchan Kim wrote: > >> > > > > Changelog since v3: > >> > > > > - Change function comments - suggested by Johannes > >> > > > > - Change function name - suggested by Johannes > >> > > > > - add only dirty/writeback pages to deactive pagevec > >> > > > > >> > > > Why the extra check? > >> > > > > >> > > > > @@ -359,8 +360,16 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping, > >> > > > > if (lock_failed) > >> > > > > continue; > >> > > > > > >> > > > > - ret += invalidate_inode_page(page); > >> > > > > - > >> > > > > + ret = invalidate_inode_page(page); > >> > > > > + /* > >> > > > > + * If the page is dirty or under writeback, we can not > >> > > > > + * invalidate it now. But we assume that attempted > >> > > > > + * invalidation is a hint that the page is no longer > >> > > > > + * of interest and try to speed up its reclaim. > >> > > > > + */ > >> > > > > + if (!ret && (PageDirty(page) || PageWriteback(page))) > >> > > > > + deactivate_page(page); > >> > > > > >> > > > The writeback completion handler does not take the page lock, so you > >> > > > can still miss pages that finish writeback before this test, no? > >> > > > >> > > Yes. but I think it's rare and even though it happens, it's not critical. > >> > > > > >> > > > Can you explain why you felt the need to add these checks? > >> > > > >> > > invalidate_inode_page can return 0 although the pages is !{dirty|writeback}. > >> > > Look invalidate_complete_page. As easiest example, if the page has buffer and > >> > > try_to_release_page can't release the buffer, it could return 0. > >> > > >> > Ok, but somebody still tried to truncate the page, so why shouldn't we > >> > try to reclaim it? The reason for deactivating at this location is > >> > that truncation is a strong hint for reclaim, not that it failed due > >> > to dirty/writeback pages. > >> > > >> > What's the problem with deactivating pages where try_to_release_page() > >> > failed? > >> > >> If try_to_release_page fails and the such pages stay long time in pagevec, > >> pagevec drain often happens. > > > > You mean because the pagevec becomes full more often? These are not > > many pages you get extra without the checks, the race window is very > > small after all. > > Right. > It was a totally bad answer. The work in midnight makes my mind to be hurt. :) > > Another point is that we can move such pages(!try_to_release_page, > someone else holding the ref) into tail of inactive. > We can't expect such pages will be freed sooner or later and it can > stir lru pages unnecessary. > On the other hand it's a _really_ rare so couldn't we move the pages into tail? > If it can be justified, I will remove the check. > What do you think about it? >
I wonder ...how about adding "victim" list for "Reclaim" pages ? Then, we don't need extra LRU rotation. Thanks, -Kame --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH v4 0/7] f/madivse(DONTNEED) support
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 1/7] Fix checkpatch's report in swap.c
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 3/7] move memcg reclaimable page into tail of in ...
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 5/7] add profile information for invalidated pag ...
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 6/7] Remove zap_details NULL dependency
, Minchan Kim
, (Sun Dec 5, 10:29 am)
[PATCH v4 7/7] Prevent activation of page in madvise_dontneed
, Minchan Kim
, (Sun Dec 5, 10:29 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, KAMEZAWA Hiroyuki
, (Sun Dec 5, 5:04 pm)
Re: [PATCH v4 1/7] Fix checkpatch's report in swap.c
, Rik van Riel
, (Sun Dec 5, 6:47 pm)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Rik van Riel
, (Sun Dec 5, 8:04 pm)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, Rik van Riel
, (Sun Dec 5, 8:24 pm)
Re: [PATCH v4 6/7] Remove zap_details NULL dependency
, Rik van Riel
, (Sun Dec 5, 8:25 pm)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Balbir Singh
, (Sun Dec 5, 8:34 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Mel Gorman
, (Mon Dec 6, 7:53 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Minchan Kim
, (Mon Dec 6, 5:17 pm)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Minchan Kim
, (Mon Dec 6, 5:20 pm)
Re: [PATCH v4 6/7] Remove zap_details NULL dependency
, Hugh Dickins
, (Mon Dec 6, 9:26 pm)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Hugh Dickins
, (Mon Dec 6, 9:48 pm)
Re: [PATCH v4 6/7] Remove zap_details NULL dependency
, Minchan Kim
, (Mon Dec 6, 10:30 pm)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Minchan Kim
, (Mon Dec 6, 10:44 pm)
Re: [PATCH v4 1/7] Fix checkpatch's report in swap.c
, Johannes Weiner
, (Tue Dec 7, 7:37 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Johannes Weiner
, (Tue Dec 7, 7:49 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, Johannes Weiner
, (Tue Dec 7, 7:52 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Johannes Weiner
, (Tue Dec 7, 8:05 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 8:07 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Johannes Weiner
, (Tue Dec 7, 8:19 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Tue Dec 7, 8:21 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 8:26 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Johannes Weiner
, (Tue Dec 7, 8:56 am)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 3:51 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, KAMEZAWA Hiroyuki
, (Tue Dec 7, 5:56 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 6:43 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, KAMEZAWA Hiroyuki
, (Tue Dec 7, 6:56 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Tue Dec 7, 7:15 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Balbir Singh
, (Tue Dec 7, 11:56 pm)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Hugh Dickins
, (Wed Dec 8, 12:26 am)
Re: [PATCH v4 7/7] Prevent activation of page in madvise_d ...
, Minchan Kim
, (Wed Dec 8, 12:55 am)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, KOSAKI Motohiro
, (Wed Dec 8, 1:02 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, KOSAKI Motohiro
, (Wed Dec 8, 1:04 am)
Re: [PATCH v4 3/7] move memcg reclaimable page into tail o ...
, KOSAKI Motohiro
, (Wed Dec 8, 1:08 am)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, Minchan Kim
, (Wed Dec 8, 1:13 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Wed Dec 8, 1:16 am)
Re: [PATCH v4 5/7] add profile information for invalidated ...
, KOSAKI Motohiro
, (Wed Dec 8, 1:36 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Ben Gamari
, (Wed Dec 8, 6:01 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Wed Dec 8, 4:10 pm)
Re: [PATCH v4 2/7] deactivate invalidated pages
, Minchan Kim
, (Wed Dec 8, 5:19 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Mon Dec 13, 8:31 am)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Ben Gamari
, (Mon Dec 13, 1:06 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, KAMEZAWA Hiroyuki
, (Mon Dec 13, 7:07 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Mon Dec 13, 7:34 pm)
Re: [PATCH v4 4/7] Reclaim invalidated page ASAP
, Minchan Kim
, (Mon Dec 13, 7:36 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Jesse Barnes
Re: [stable] [BUG][PATCH] cpqphp: fix kernel NULL pointer dereference
Greg KH
[003/136] p54usb: add Zcomax XG-705A usbid
Magnus Damm
[PATCH 03/07] ARM: Use shared GIC entry macros on Realview
Oliver Neukum
Re: [Bug #13682] The webcam stopped working when upgrading from 2.6.29 to 2.6.30
Martin Schwidefsky
Re: [PATCH] optimized ktime_get[_ts] for GENERIC_TIME=y
git
:
Junio C Hamano
Re: Some advanced index playing
Jeff King
Re: confusion over the new branch and merge config
Robin Rosenberg
Re: cvs2svn conversion directly to git ready for experimentation
Linus Torvalds
git binary size...
Ævar Arnfjörð Bjarmason
Re: Challenge with Git-Bash
git-commits-head
:
Linux Kernel Mailing List
md: move allocation of ->queue from mddev_find to md_probe
Linux Kernel Mailing List
md: raid0: Represent zone->zone_offset in sectors.
Linux Kernel Mailing List
[ARM] S3C24XX: Add gpio_to_irq() facility
Linux Kernel Mailing List
md: raid0_make_request(): Replace local variable block by sector.
Linux Kernel Mailing List
md: Allow md devices to be created by name.
linux-netdev
:
kaber
[PATCH 07/12] netfilter: xtables: change hotdrop pointer to direct modification
Gerrit Renker
[PATCH 3/5] dccp ccid-2: Remove redundant sanity tests
David Miller
Re: [PATCH net-next-2.6] pcnet32: Remove redundant set of skb->dev
Gerrit Renker
[PATCH 4/5] dccp ccid-2: Simplify dec_pipe and rearming of RTO timer
Saikiran Madugula
[PATCH] Allow fragmentation of VLAN packets traversing a bridge.
freebsd-current
:
Ryan Stone
Re: Re[3]: [Call For Testing] VirtualBox for FreeBSD! take2
Alexey Shuvaev
Re: Ruby w/clang (Was: Re: [CFT]: ClangBSD is selfhosting, we need testers now)
Cristian KLEIN
Re: small purposal for change in installworld
FreeBSD Tinderbox
[head tinderbox] failure on sparc64/sparc64
Mark Martinec
Support for newer Ethernet chips in RE(4) driver?
Colocation donated by:
Syndicate