Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3260915pxt; Mon, 9 Aug 2021 22:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTj9jsc6td9nwZ5LFdTuXz7L7ujP+nhz/DdZ1wjuSO7XRGDJjwrb9wqDbBxWok4n1Q8NHA X-Received: by 2002:a50:cc06:: with SMTP id m6mr2657920edi.97.1628573114470; Mon, 09 Aug 2021 22:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628573114; cv=none; d=google.com; s=arc-20160816; b=zQUZVfg1GzJvAAnImJMs713zFEnDwDWij0kOOzYgXEodo4+n2E8C2dCh3u6Hj1uUGX kZ0O0/In5CvnAaLS2pYbCa4hsuqFiXG1fOK/k6y6sufV0x4Uw/PE6JOLUdLIzej3tP1n pUEVQrcImUqAXkWVPjGq9LykuUa6Nq+DtNiI6TRzDQYx8t5H0YfoyucY0q7Gr+W+yjqW guBiOlL/Bcnq1ePXtSxxsQVfpd/5C4RnoA+zFT2bsZDwSShkWDxcdOWxwCVsHE+W+GVj yApmmPa00gkGh4ovancwiUeZPmF2Kj6yHhq5Vcflib//WwV4z2w2uUskx9Zb2KX9IgnD 9UBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hvASQKCQgVsj9cz4DvexOkfUTzkqdld5caICujbsG0k=; b=hsptp3l5I84peI95tNDqdSJO6xJuEkNoHsrzGlnKccPf+Wpf4JjzPalkz9ed+KHyS7 fgxQSMVDgD1LIdfECTdEMU7qbgo1BbFFcJcJR2Mz196ATaXTnxB7fCN9/zLuwysAuggA 6b7UochDogEqAKwQc8ueG1DSH8Hn2vFwa2KfKKLgicRN2VmDcEu3n0W5i7k9p2ldGOXX KlPd4WMEYdaVfEEayOfocvlemjzkwrPChg9KsaWwlcYpJGcC2iGPBdHt2ymMX0s5xwx6 UU3AfxfuFuj2H34hdXBlW/LHyWZyRW9kEDM+jHp+uREiHUqbaS4iw2VYqNYNKUqpxNRN Q86w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WEPcUrMw; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si20892736edm.341.2021.08.09.22.24.52; Mon, 09 Aug 2021 22:25:14 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WEPcUrMw; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234208AbhHJBMU (ORCPT + 99 others); Mon, 9 Aug 2021 21:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbhHJBMT (ORCPT ); Mon, 9 Aug 2021 21:12:19 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62E1BC0613D3 for ; Mon, 9 Aug 2021 18:11:58 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id go31so32316428ejc.6 for ; Mon, 09 Aug 2021 18:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hvASQKCQgVsj9cz4DvexOkfUTzkqdld5caICujbsG0k=; b=WEPcUrMwhSjCtvJr3lyiXiHfyBIWI/dBFaI+nTWK3mC6PRHJLUW+ATiQj+s931uS+r VJUGI5iNFFr0DvdUQxR5Ptjv7LkWoV9a+YjnI70JgDOAKDY8Du2+0Agx6kA7u5RoXf20 m2Q6KRNvk981oAJal7PWR9XS9+484N8y4nzcL7+otaEx+0gSOHZr1G9e4Jxjm6rwiD2u nE/3f06zyjFdqFGwPVDattiqHZlzuZfxTwvG8nJNHM3TcB4Q4Eo7K7AQQWXk49n9//z+ EdOctC1inxYYK+CFwSKhU0C91CHBHJCHwFInHiTZ38tQh00nJ4liyneelrnzU/z4+kl3 hXyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hvASQKCQgVsj9cz4DvexOkfUTzkqdld5caICujbsG0k=; b=Bk2jGHrBouKfJACGjrzkj+gih77v66EwK5vmc3GO7X5nhIHbStYMvEKjXa/fV5T41C 7kvuFyDnI7WluxjUOfu9ZYIgGjmZwc1jM10x9DdDpMQ8w/GXdnn/1s94F4t3MXBmrOTq qaz/fcl/UR85pO06TfZcdEZV6XA48YXUEUq/MljWOCnfh9sPm/HvInug3BGQ5V/LLJls IrgJiYzwt8ssJMA+ajT4ccC66Sas2tYRpAGGiIUURf4rAVs5CzUTqrzoYcYaaLLz1sEr 1UVfWsKEhiuiLLFbQxbzfx+K3O3cAHTlU5SQpdH8so9yl6xOp25wxHEuGQUdRpjY4BVA 1k7g== X-Gm-Message-State: AOAM530qMN/C975aM/BTERftpXYajS17+RZ7w2GaKUVNA7EQabZFUsFa SmoRaM0MxESwMJe0yH9yQm6VUI/asSacUoeCxV4= X-Received: by 2002:a17:907:76a1:: with SMTP id jw1mr10657633ejc.238.1628557917058; Mon, 09 Aug 2021 18:11:57 -0700 (PDT) MIME-Version: 1.0 References: <20210723080000.93953-1-ying.huang@intel.com> <24187e5e-069-9f3f-cefe-39ac70783753@google.com> <8735rr54i9.fsf@yhuang6-desk2.ccr.corp.intel.com> <704d597-443b-32f-84eb-524a58dd8ef@google.com> <87k0ku89ql.fsf@yhuang6-desk2.ccr.corp.intel.com> In-Reply-To: <87k0ku89ql.fsf@yhuang6-desk2.ccr.corp.intel.com> From: Yang Shi Date: Mon, 9 Aug 2021 18:11:44 -0700 Message-ID: Subject: Re: [PATCH] mm,shmem: Fix a typo in shmem_swapin_page() To: "Huang, Ying" Cc: Hugh Dickins , Matthew Wilcox , Andrew Morton , David Hildenbrand , Linux MM , Linux Kernel Mailing List , Miaohe Lin , Johannes Weiner , Michal Hocko , Joonsoo Kim , Minchan Kim Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 9, 2021 at 4:43 PM Huang, Ying wrote: > > Yang Shi writes: > > > On Fri, Aug 6, 2021 at 1:37 PM Yang Shi wrote: > >> > >> On Thu, Aug 5, 2021 at 11:01 PM Hugh Dickins wrote: > >> > > >> > On Thu, 5 Aug 2021, Yang Shi wrote: > >> > > On Tue, Aug 3, 2021 at 10:34 PM Hugh Dickins wrote: > >> > > > > >> > > > I've never seen the swapoff race claimed by Miaohe, and don't expect to; > >> > > > but he's probably right, given the current code. I just dislike adding > >> > > > unnecessary complexity, and siting it in the wrong place (mm/shmem.c). > >> > > > > >> > > > Yang, is it possible that 5.1 commit 8fd2e0b505d1 ("mm: swap: check if > >> > > > swap backing device is congested or not") was actually developed and > >> > > > measured on 4.1 or earlier, which still had blk_set_queue_congested()? > >> > > > >> > > I forgot the exact version, but definitely not 4.1 or earlier. Maybe > >> > > 4.19 or earlier. I'm not familiar with how block layer detect > >> > > congestion, if the logic was changed, hence the optimization doesn't > >> > > stand anymore nowadays, I'm totally fine to remove it. > >> > > >> > You drove me back to look more closely. blk_set_queue_congested() > >> > vanished from include/linux/blkdev.h in 4.2, but blk_set_congested() > >> > appeared then in block/blk-core.c to replace it. blk_set_congested() > >> > vanished (along with all references to "congested" in blk-core.c) in > >> > 5.0, then your commit (most probably tested on 4.19) went into 5.1 - > >> > just after it had become redundant! > >> > > >> > Thanks, yes, let's revert that and Miaohe's and Huang's, later on. > >> > >> It should be easier to revert Huang Ying's , then Miaohe's, then mine. > > > > Hi Ying, > > > > I just prepared the reverts since I need to revert yours and Miaohe's > > in order to revert my problematic commit. > > If your original commit will be reverted, then mine and Miaohe's can be > reverted from the race condition point of view. Yes, this is exactly what I did. > > Although I still think it's better to call get/put_swap_device() in > shmem_swapin_page(), that can be discussed with another patch. Any additional change could be based off the reverts. > > Best Regards, > Huang, Ying