From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Weiner Subject: Re: [PATCH 15/17] mm: Do not use unnecessary atomic operations when adding pages to the LRU Date: Thu, 1 May 2014 09:33:40 -0400 Message-ID: <20140501133340.GE23420@cmpxchg.org> References: <1398933888-4940-1-git-send-email-mgorman@suse.de> <1398933888-4940-16-git-send-email-mgorman@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux-MM , Linux-FSDevel , Vlastimil Babka , Jan Kara , Michal Hocko , Hugh Dickins , Linux Kernel To: Mel Gorman Return-path: Content-Disposition: inline In-Reply-To: <1398933888-4940-16-git-send-email-mgorman@suse.de> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Thu, May 01, 2014 at 09:44:46AM +0100, Mel Gorman wrote: > When adding pages to the LRU we clear the active bit unconditionally. As the > page could be reachable from other paths we cannot use unlocked operations > without risk of corruption such as a parallel mark_page_accessed. This > patch test if is necessary to clear the atomic flag before using an atomic > operation. In the unlikely even this races with mark_page_accesssed the event > consequences are simply that the page may be promoted to the active list > that might have been left on the inactive list before the patch. This is > a marginal consequence. > > Signed-off-by: Mel Gorman Acked-by: Johannes Weiner -- 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