* lru_add_drain query
@ 2005-02-03 17:22 Ray Bryant
2005-02-03 23:50 ` Nick Piggin
0 siblings, 1 reply; 2+ messages in thread
From: Ray Bryant @ 2005-02-03 17:22 UTC (permalink / raw)
To: linux-mm; +Cc: Nick Piggin
The deferred lru_add operations (e. g. lru_cache_add_active()) defer the
actual addition of a page to the lru list until a batch of such additions
are available. lru_cache_add_active() uses a per cpu variable
(lru_add_active_pvecs) to hold the deferred pages.
So, to get the deferred adds to complete (so that the lru list is in a
consistent state and we can scan lru list to do some processing) one calls
lru_add_drain(). But AFAI can tell, this just drains the local cpu's
deferred add queue. Right?
So, here's my question: Why is it that I don't need to call lru_add_drain()
on each CPU in the system before I go scan/manipulate the lru list? (i. e.
what about deferred adds in other CPU's lru_add_active_pvecs?)
What peice of magic am I missing here?
Thanks,
--
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
raybry@sgi.com raybry@austin.rr.com
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------
--
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:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: lru_add_drain query
2005-02-03 17:22 lru_add_drain query Ray Bryant
@ 2005-02-03 23:50 ` Nick Piggin
0 siblings, 0 replies; 2+ messages in thread
From: Nick Piggin @ 2005-02-03 23:50 UTC (permalink / raw)
To: Ray Bryant; +Cc: linux-mm
Ray Bryant wrote:
> The deferred lru_add operations (e. g. lru_cache_add_active()) defer the
> actual addition of a page to the lru list until a batch of such additions
> are available. lru_cache_add_active() uses a per cpu variable
> (lru_add_active_pvecs) to hold the deferred pages.
>
> So, to get the deferred adds to complete (so that the lru list is in a
> consistent state and we can scan lru list to do some processing) one
> calls
> lru_add_drain(). But AFAI can tell, this just drains the local cpu's
> deferred add queue. Right?
>
> So, here's my question: Why is it that I don't need to call
> lru_add_drain()
> on each CPU in the system before I go scan/manipulate the lru list?
> (i. e.
> what about deferred adds in other CPU's lru_add_active_pvecs?)
>
> What peice of magic am I missing here?
>
I don't think you're missing anything. See lru_drain_cache for when you
really need to drain another CPU's cache (ie cpu hotplug).
I think the idea is that it doesn't _really_ matter to have a few pages
not visible to the LRU lists at any point in time.
--
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:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-03 23:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-03 17:22 lru_add_drain query Ray Bryant
2005-02-03 23:50 ` Nick Piggin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox