From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759997AbdLRVN0 (ORCPT ); Mon, 18 Dec 2017 16:13:26 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:40946 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753162AbdLRVNZ (ORCPT ); Mon, 18 Dec 2017 16:13:25 -0500 X-Google-Smtp-Source: ACJfBouGLEsyk6P6L31BXczqB1GEX9GF9PG5ZO6Mogs+KaR3cM4CAca7TqS+psgPoDeVzTLNk8Cdpg== From: Junaid Shahid To: "Huang, Ying" Cc: Andrew Morton , "Paul E . McKenney" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hugh Dickins , Minchan Kim , Johannes Weiner , Tim Chen , Shaohua Li , Mel Gorman , =?ISO-8859-1?Q?J=E9r=F4me?= Glisse , Michal Hocko , Andrea Arcangeli , David Rientjes , Rik van Riel , Jan Kara , Dave Jiang , Aaron Lu Subject: Re: [PATCH -V3 -mm] mm, swap: Fix race between swapoff and some swap operations Date: Mon, 18 Dec 2017 13:13:21 -0800 Message-ID: <3897758.H188Yq1CBR@js-desktop.svl.corp.google.com> Organization: Google User-Agent: KMail/5.2.3 (Linux/4.9.0-4-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <877etkwki2.fsf@yhuang-dev.intel.com> References: <20171218073424.29647-1-ying.huang@intel.com> <877etkwki2.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, December 18, 2017 3:41:41 PM PST Huang, Ying wrote: > > A version implemented via stop_machine() could be gotten via a small > patch as below. If you still prefer stop_machine(), I can resend a > version implemented with stop_machine(). > For the stop_machine() version, would it work to just put preempt_disable/enable at the start and end of lock_cluster() rather than introducing get/put_swap_device? Something like that might be simpler and would also disable preemption for less duration. Thanks, Junaid