From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666AbeADKVS (ORCPT + 1 other); Thu, 4 Jan 2018 05:21:18 -0500 Received: from outbound-smtp26.blacknight.com ([81.17.249.194]:35965 "EHLO outbound-smtp26.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467AbeADKVQ (ORCPT ); Thu, 4 Jan 2018 05:21:16 -0500 Date: Thu, 4 Jan 2018 10:21:14 +0000 From: Mel Gorman To: "Huang, Ying" Cc: Jan Kara , Mel Gorman , Minchan Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hugh Dickins , "Paul E . McKenney" , Johannes Weiner , Tim Chen , Shaohua Li , J???r???me Glisse , Michal Hocko , Andrea Arcangeli , David Rientjes , Rik van Riel , Dave Jiang , Aaron Lu Subject: Re: [PATCH -V4 -mm] mm, swap: Fix race between swapoff and some swap operations Message-ID: <20180104102114.l45sjluuzdgpcfd7@techsingularity.net> References: <871sjopllj.fsf@yhuang-dev.intel.com> <20171221235813.GA29033@bbox> <87r2rmj1d8.fsf@yhuang-dev.intel.com> <20171223013653.GB5279@bgram> <20180102102103.mpah2ehglufwhzle@suse.de> <20180102112955.GA29170@quack2.suse.cz> <20180102132908.hv3qwxqpz7h2jyqp@techsingularity.net> <87o9mbixi0.fsf@yhuang-dev.intel.com> <20180103095408.pqxggi7voser7ia3@techsingularity.net> <87lgheh173.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <87lgheh173.fsf@yhuang-dev.intel.com> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 09:17:36AM +0800, Huang, Ying wrote: > > Maybe, but in this particular case, I would prefer to go with something > > more conventional unless there is strong evidence that it's an improvement > > (which I doubt in this case given the cost of migration overall and the > > corner case of migrating a dirty page). > > So you like page_lock() more than RCU? In this instance, yes. > Is there any problem of RCU? > The object to be protected isn't clear? > It's not clear what object is being protected or how it's protected and it's not the usual means a mapping is pinned. Furthermore, in the event a page is being truncated, we really do not want to bother doing any migration work for compaction purposes as it's a waste. -- Mel Gorman SUSE Labs