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=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham 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 CAB0CC4338F for ; Tue, 10 Aug 2021 21:08:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4DC5960F55 for ; Tue, 10 Aug 2021 21:08:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4DC5960F55 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 92FCD6B0071; Tue, 10 Aug 2021 17:08:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8DFEB6B0072; Tue, 10 Aug 2021 17:08:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CF658D0001; Tue, 10 Aug 2021 17:08:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 616406B0071 for ; Tue, 10 Aug 2021 17:08:52 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0E66718033791 for ; Tue, 10 Aug 2021 21:08:52 +0000 (UTC) X-FDA: 78460410504.08.387697B Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by imf22.hostedemail.com (Postfix) with ESMTP id B8A834F97 for ; Tue, 10 Aug 2021 21:08:51 +0000 (UTC) Received: by mail-oi1-f177.google.com with SMTP id bj40so1121818oib.6 for ; Tue, 10 Aug 2021 14:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=rBnuCjF4OrAtuZ/I6bis+5AbEoYqDoFUpxjnGFAFTWc=; b=V3VuFDuP8N54+ffqX3fMhnzQtEGCVpjz5Z6o5m/ZCzdX7pw6maVxapH8gKIpA1PFvl N7ODFJxahvN5s1IgMO0lwnAQsQiurvHTxMPOpF+T7Z/1kB8GQ1MEbpEP6BY4VGmu3qWh AOUoiYUf41YInPtRCN758oQenC0caBV1BvHQmTS++UHmHfaANxVQKqIQo7Cd4MDDl4yq zuX+LUfW8IKY5I2xDwb1rtQLYpVhIwrMQcF5tJ+HIVFCf8TgGRlN7vUc2oOR+C36egEV WNm/5EznEMshnMgKZsTPGXmdR4vd7mq00uvtae0rydqYSwN+q66njXE+PEGLosvctRrS qvsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=rBnuCjF4OrAtuZ/I6bis+5AbEoYqDoFUpxjnGFAFTWc=; b=EuVxxfVxqdncs71ONyeh06UXVWB6S1h2VFmHldIu3aajF5knylZXC/zzo4x1mOQVAu FqTKSbmCTa2pzWitE8cmL+CUAzdYh19YGPJK+T/wVn4a25A5p6Tn2TGr1QzPDMwJTAwn 39RX2kms38yK+FwdvBPD9ZeYnVjqXciTr0l2sGWGqT40WBWGxaj2RCncxetu+gkrgtd9 KvVrAx3bszIsr+k2NjgSR6QFR71/ABbPkPMfJDgJGfcAebuq1Zp0ioJ7OUmYud1Y7WbS jvNNtqLLA/Gsi6cOYdV3vXjBr5k/j6lYwAhhEN+k6tG1lyyEl9XNWQMwSOPzGS9pt8dQ 5e4A== X-Gm-Message-State: AOAM533aLeKQGUWZ/oFM8cMxgx43v5YM6ZBC+Alq01gHxNi2uqmdUtBG aL/bRgUcwPeX6TcZIwKyTqcGLg== X-Google-Smtp-Source: ABdhPJzNLDtfFYwyZE8sXaFXrcq3Gdv4urYj+yP5wcE3AoJiSU6zeV++3TGdD1jwnwlnogniOTTFiQ== X-Received: by 2002:aca:1e05:: with SMTP id m5mr4970545oic.29.1628629730876; Tue, 10 Aug 2021 14:08:50 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id y138sm3399706oie.22.2021.08.10.14.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 14:08:50 -0700 (PDT) Date: Tue, 10 Aug 2021 14:08:38 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Yang Shi cc: hughd@google.com, ying.huang@intel.com, linmiaohe@huawei.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] Revert "mm: swap: check if swap backing device is congested or not" In-Reply-To: <20210810202936.2672-3-shy828301@gmail.com> Message-ID: <3983c910-a02b-e67b-8c2b-7a379c3d22e1@google.com> References: <20210810202936.2672-1-shy828301@gmail.com> <20210810202936.2672-3-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=V3VuFDuP; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf22.hostedemail.com: domain of hughd@google.com designates 209.85.167.177 as permitted sender) smtp.mailfrom=hughd@google.com X-Stat-Signature: 53m13fnodaykwh6m6kns6djmc59ebxpx X-Rspamd-Queue-Id: B8A834F97 X-Rspamd-Server: rspam01 X-HE-Tag: 1628629731-815915 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 Tue, 10 Aug 2021, Yang Shi wrote: > Due to the change about how block layer detects congestion the > justification of commit 8fd2e0b505d1 ("mm: swap: check if swap backing device > is congested or not") doesn't stand anymore, so the commit could be just > reverted in order to solve the race reported by commit 2efa33fc7f6e ("mm/shmem: > fix shmem_swapin() race with swapoff"). The fix was reverted by the > previous patch. > > Suggested-by: Hugh Dickins > Cc: "Huang, Ying" > Cc: Miaohe Lin > Signed-off-by: Yang Shi Thanks for doing these, Acked-by: Hugh Dickins to all three. I guess 1/3 will vanish now, since what it's reverting has not yet gone forward to Linus: it would have been nice for 2/3 to have mentioned that what it's reverting is kindof buggy: but then you'd have to explain the "kindof", and that takes more words than it's worth - maybe a lore Link to the discussion? But you've done the work that I've not yet got around to: so thank you, and ignore my gripes. Hugh > --- > mm/swap_state.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/mm/swap_state.c b/mm/swap_state.c > index 1a29b4f98208..8d4104242100 100644 > --- a/mm/swap_state.c > +++ b/mm/swap_state.c > @@ -628,13 +628,6 @@ struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask, > if (!mask) > goto skip; > > - /* Test swap type to make sure the dereference is safe */ > - if (likely(si->flags & (SWP_BLKDEV | SWP_FS_OPS))) { > - struct inode *inode = si->swap_file->f_mapping->host; > - if (inode_read_congested(inode)) > - goto skip; > - } > - > do_poll = false; > /* Read a page_cluster sized and aligned cluster around offset. */ > start_offset = offset & ~mask; > -- > 2.26.2