From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mel Gorman Subject: Re: [PATCH 15/17] mm: Do not use unnecessary atomic operations when adding pages to the LRU Date: Thu, 1 May 2014 14:40:28 +0100 Message-ID: <20140501134028.GL23991@suse.de> References: <1398933888-4940-1-git-send-email-mgorman@suse.de> <1398933888-4940-16-git-send-email-mgorman@suse.de> <20140501133340.GE23420@cmpxchg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Cc: Linux-MM , Linux-FSDevel , Vlastimil Babka , Jan Kara , Michal Hocko , Hugh Dickins , Linux Kernel To: Johannes Weiner Return-path: Content-Disposition: inline In-Reply-To: <20140501133340.GE23420@cmpxchg.org> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Thu, May 01, 2014 at 09:33:40AM -0400, Johannes Weiner wrote: > 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 > Will be corrected in v3. Thanks. -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754831AbaEANkd (ORCPT ); Thu, 1 May 2014 09:40:33 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34068 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbaEANkc (ORCPT ); Thu, 1 May 2014 09:40:32 -0400 Date: Thu, 1 May 2014 14:40:28 +0100 From: Mel Gorman To: Johannes Weiner Cc: Linux-MM , Linux-FSDevel , Vlastimil Babka , Jan Kara , Michal Hocko , Hugh Dickins , Linux Kernel Subject: Re: [PATCH 15/17] mm: Do not use unnecessary atomic operations when adding pages to the LRU Message-ID: <20140501134028.GL23991@suse.de> References: <1398933888-4940-1-git-send-email-mgorman@suse.de> <1398933888-4940-16-git-send-email-mgorman@suse.de> <20140501133340.GE23420@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20140501133340.GE23420@cmpxchg.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 01, 2014 at 09:33:40AM -0400, Johannes Weiner wrote: > 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 > Will be corrected in v3. Thanks. -- Mel Gorman SUSE Labs