Thread (39 messages) 39 messages, 6 authors, 2012-12-05

Re: [PATCH 2/2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable

From: Mel Gorman <mgorman@suse.de>
Date: 2012-12-04 18:26:19
Also in: lkml

On Tue, Dec 04, 2012 at 06:37:41AM -0800, Michel Lespinasse wrote:
On Mon, Dec 3, 2012 at 6:17 AM, Mel Gorman [off-list ref] wrote:
quoted
On Sat, Dec 01, 2012 at 09:15:38PM +0100, Ingo Molnar wrote:
quoted
@@ -732,7 +732,7 @@ static int page_referenced_anon(struct p
      struct anon_vma_chain *avc;
      int referenced = 0;

-     anon_vma = page_lock_anon_vma(page);
+     anon_vma = page_lock_anon_vma_read(page);
      if (!anon_vma)
              return referenced;
This is a slightly trickier one as this path is called from reclaim. It does
open the possibility that reclaim can stall something like a parallel fork
or anything that requires the anon_vma rwsem for a period of time. I very
severely doubt it'll really be a problem but keep an eye out for bug reports
related to delayed mmap/fork/anything_needing_write_lock during page reclaim.
I don't see why this would be a problem - rwsem does implement
reader/writer fairness, so having some sites do a read lock instead of
a write lock shouldn't cause the write lock sites to starve. Is this
what you were worried about ?
Yes. I did not expect they would be starved forever, just delayed longer
than they might have been before. I would be very surprised if there is
anything other than a synthetic case that will really care but I've been
"very surprised" before :)

-- 
Mel Gorman
SUSE Labs

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help