Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3228490pxb; Tue, 13 Apr 2021 23:41:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsVTwiDIZll2RwxD1vyf1GWTiKmXg3yIhcs7V8Ugc0JXOVn9YMiu3/vvU8zrgJA+2FGb6m X-Received: by 2002:a17:906:6683:: with SMTP id z3mr36425031ejo.390.1618382514860; Tue, 13 Apr 2021 23:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618382514; cv=none; d=google.com; s=arc-20160816; b=Qs+RwacVgyT0YKkJxuFlDqIqKSVwPAP8Ws4+chMTioRYNMnszAI3dZd/Py0C+I0fS5 Wg0+H9OfmidoTI6iVm+apDjTVtEE9QjnsoP24stuzl22osDLVD2PTGxCbO5hKtPxTIAR QNB4Huegc1pqJF57VM44xL3vH1n8waHwalY30UY48fdXuTPUaPasm36KFRDF4/oCBsYJ cXYU775oXP9ig5yTRW3kOytgCaTXZkNJGnOfCL/HVbspdDCMUCtuCN3URh8hsFd74qeN RFwaPPRLqF/HPUFuKWO5qwSebGCNUQ/W5xDphDz8AGExwXfDC20SK/+SCP+CFjlTsIqW lMZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=+WyiPNM4PbDbAT4xPZ1gfc1nblOUKb8t/0IO3HYWBkY=; b=nD+X3pHHCaKfI1LhShACAmKe29ru/H+S8W6l6nU5IJAa6f88m814BERSaq8X7uQ2V1 bM2g58pFyE40Jir5h0qmOkS4udYX6oqo7CKTQTsYnTXAkwd2Kx3tG0srx9MUi3rr9eq4 7tIUz+XWPnvwutUc1Kl7s8NbGxmXFzZUig8VTk0+6y1XSfeUNcG/PTmPZuJiLnZ6fTa5 gQqXrhB4ptm3REgeXFdbnhVr7u2NLpVpa7P1UNrIqw5U/nj3wWV3TSxCpi7VR0Vo7xhu vmIqSG+RGzYkm2mo1vON+kabW36IcHP3TolJWhr/gw2cBeuUbwIQja5ZPprvD7i3rIc9 Z+5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si10973837ejl.510.2021.04.13.23.41.31; Tue, 13 Apr 2021 23:41:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233000AbhDMTYp (ORCPT + 99 others); Tue, 13 Apr 2021 15:24:45 -0400 Received: from mga18.intel.com ([134.134.136.126]:16148 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbhDMTYp (ORCPT ); Tue, 13 Apr 2021 15:24:45 -0400 IronPort-SDR: hQ9PY7ww3vuuG533NQFdj4ayX6yaBbT/VhXeBYfxCnTQEDxygbewUKHjROHmJNjUFZqYSTgmxt JDmiBeFByqag== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="181997762" X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="181997762" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 12:24:19 -0700 IronPort-SDR: 2yoHeovCI3a6lwDX15UkiP+br97TlGA4ZUuiWGsE3zX4jQw45Wy2CkHVPqR70e+/2rirbrrRrU RZUTBeZgmudw== X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="443539373" Received: from schen9-mobl.amr.corp.intel.com ([10.209.18.184]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 12:24:17 -0700 Subject: Re: [PATCH 2/5] swap: fix do_swap_page() race with swapoff To: "Huang, Ying" , Miaohe Lin Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, mhocko@suse.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, alex.shi@linux.alibaba.com, willy@infradead.org, minchan@kernel.org, richard.weiyang@gmail.com, hughd@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20210408130820.48233-1-linmiaohe@huawei.com> <20210408130820.48233-3-linmiaohe@huawei.com> <87o8ejug76.fsf@yhuang6-desk1.ccr.corp.intel.com> From: Tim Chen Message-ID: Date: Tue, 13 Apr 2021 12:24:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <87o8ejug76.fsf@yhuang6-desk1.ccr.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/12/21 6:27 PM, Huang, Ying wrote: > > This isn't the commit that introduces the race. You can use `git blame` > find out the correct commit. For this it's commit 0bcac06f27d7 "mm, > swap: skip swapcache for swapin of synchronous device". > > And I suggest to merge 1/5 and 2/5 to make it easy to get the full > picture. I'll suggest make fix to do_swap_page race with get/put_swap_device as a first patch. Then the per_cpu_ref stuff in patch 1 and patch 2 can be combined together. Tim