From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx159.postini.com [74.125.245.159]) by kanga.kvack.org (Postfix) with SMTP id 5BA076B0068 for ; Tue, 4 Dec 2012 09:37:42 -0500 (EST) Received: by mail-vb0-f50.google.com with SMTP id fr13so2931920vbb.9 for ; Tue, 04 Dec 2012 06:37:41 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20121203141701.GN8218@suse.de> References: <1354305521-11583-1-git-send-email-mingo@kernel.org> <20121201094927.GA12366@gmail.com> <20121201122649.GA20322@gmail.com> <20121201184135.GA32449@gmail.com> <20121201201538.GB2704@gmail.com> <20121203141701.GN8218@suse.de> Date: Tue, 4 Dec 2012 06:37:41 -0800 Message-ID: Subject: Re: [PATCH 2/2] mm/migration: Make rmap_walk_anon() and try_to_unmap_anon() more scalable From: Michel Lespinasse Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Ingo Molnar , Linus Torvalds , Linux Kernel Mailing List , linux-mm , Peter Zijlstra , Paul Turner , Lee Schermerhorn , Christoph Lameter , Rik van Riel , Andrew Morton , Andrea Arcangeli , Thomas Gleixner , Johannes Weiner , Hugh Dickins On Mon, Dec 3, 2012 at 6:17 AM, Mel Gorman wrote: > On Sat, Dec 01, 2012 at 09:15:38PM +0100, Ingo Molnar wrote: >> @@ -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 ? -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. -- 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: email@kvack.org