From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1166CC4320A for ; Mon, 9 Aug 2021 21:27:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A2B4960EBC for ; Mon, 9 Aug 2021 21:27:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A2B4960EBC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E5D3A6B0071; Mon, 9 Aug 2021 17:27:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E0D6E6B0072; Mon, 9 Aug 2021 17:27:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFCA46B0073; Mon, 9 Aug 2021 17:27:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0212.hostedemail.com [216.40.44.212]) by kanga.kvack.org (Postfix) with ESMTP id B32366B0071 for ; Mon, 9 Aug 2021 17:27:04 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 560481826485A for ; Mon, 9 Aug 2021 21:27:04 +0000 (UTC) X-FDA: 78456827568.36.A8FD9B1 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by imf30.hostedemail.com (Postfix) with ESMTP id 0AA1AE002125 for ; Mon, 9 Aug 2021 21:27:02 +0000 (UTC) Received: by mail-ed1-f42.google.com with SMTP id n12so2911860edx.8 for ; Mon, 09 Aug 2021 14:27:02 -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=YaV9NVqoq9LCYplA+3/Ve0aFKd3h4CZcYgQ/yOddy8s=; b=Fc3jp/RgzdpnTTYxJuiI7fECrVZDYD0kt6WXyXJePKxxM5pEaaLSQYOn/fatlEdB3U csfWHPef2oifE09OKSaRhovvzfLpxRq1I7NhUYsk67BhgQ7dLSOcX94L/wkRxMcpTS// 4rz2OFcbbI2b8Z45IrUwOUmo0F/ktKBvWj+KAUhEDITeRdUsxFKjhN3scrtx2pTHtrKg NXGEnggrVZPwaOZ6/y8GF0LFEEUjai2kaeN5B7OuN2ejTZaR88ryybv9RQG+QXpdkAGL Ysbg+ktIs+d9KlzRQ5Z5JDI3Y+LWf0HTbIlY0yQp1QdPje8qrY88jbJSILlSFU+Mo+lg mtzg== 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=YaV9NVqoq9LCYplA+3/Ve0aFKd3h4CZcYgQ/yOddy8s=; b=UEb1K1ZEtEcyi5sAD5MJDgVrcW+ts/GOhMV0+PKqCIL5BrbnnZEBM9SjNjSa6LzGV8 YwfU+gNrkm+yEUAsUf+KVSTWt9VTJC/v1yHA/hhZqaRpN+mBQp3zAQH1okgZ5o0SAvmd QEqbg+CeXlgwQWaLPJwvc5bekxIYTZ54swwy1jO5HcaoPRijPCElUVPX7w7TH4nq2l0p Dge1IaJyvl8mtTGbBI7PEvRdApd37tMWEUITP2cyUv/6sJMEsv8gq8HtVWXMxEwe23gS nrw/ubAj+B8vvzrsMsSzNWLk3FDwl8BidzEbTf9/XWtjVHEGqkxQNChv7J/oiST/Hq77 WKUQ== X-Gm-Message-State: AOAM533jPNcYmr47ZNXRsXXR0oX9F4k4hAzEvIxC34fdfL0h8X5pMKJ5 ql1F5abikf0glWW9SOrUoIC2Eols8GnvuMsAUfU= X-Google-Smtp-Source: ABdhPJxK4WIpED+2en208KMp3JeUS6egiEIT7y2XiERNvp30tEwuM3WCVX87z79otzyWldkaaGq3JK2cL/46JdWYrEs= X-Received: by 2002:a05:6402:b72:: with SMTP id cb18mr422927edb.290.1628544421850; Mon, 09 Aug 2021 14:27:01 -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> In-Reply-To: From: Yang Shi Date: Mon, 9 Aug 2021 14:26:49 -0700 Message-ID: Subject: Re: [PATCH] mm,shmem: Fix a typo in shmem_swapin_page() To: Hugh Dickins Cc: Matthew Wilcox , "Huang, Ying" , 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" Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Fc3jp/Rg"; spf=pass (imf30.hostedemail.com: domain of shy828301@gmail.com designates 209.85.208.42 as permitted sender) smtp.mailfrom=shy828301@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 0AA1AE002125 X-Stat-Signature: by9wjfj1uyy44npdmwx7fwu8o5pt666s X-HE-Tag: 1628544422-870399 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. > > > > > Hugh