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=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 22CBFC4338F for ; Tue, 10 Aug 2021 21:30:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B2F3B61019 for ; Tue, 10 Aug 2021 21:30:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B2F3B61019 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 286C58D0001; Tue, 10 Aug 2021 17:30:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 210F96B0072; Tue, 10 Aug 2021 17:30:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D8698D0001; Tue, 10 Aug 2021 17:30:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id E41906B0071 for ; Tue, 10 Aug 2021 17:30:30 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6DE9218209A86 for ; Tue, 10 Aug 2021 21:30:30 +0000 (UTC) X-FDA: 78460465020.06.34346D2 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf12.hostedemail.com (Postfix) with ESMTP id 2ED0510003FC for ; Tue, 10 Aug 2021 21:30:30 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id b7so214350edu.3 for ; Tue, 10 Aug 2021 14:30:29 -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=Nbn6ZPqkgK9dtSMellsW60riYifwyh558pvvalRPKrw=; b=JPzruZzkNY8TxWgqhBBMdQvjW6YoxvvAopnMkvh2hTrFAg+C85ttcWO9Psot5KPfDE lh/2T/yr9Ki8TeU9rryUe9xIvoMcGErbBLGE+Fa4opsCNssoRLx8/c3cSN4tTV1RPzrZ 6CVh8LyVnqz2OB53ssIOlsy0XYgveFJtVQgKFbsKTpkLW5ghlkU4Vor0oOtYQv0CaGbR sQEx9DysS9bpr5pxYHKUt9RQsgmOSVjBv4n6hl7rknlnY9uILeqjCdXvML+2TqklszXG qM+fvjkyAIO2WI7sOOcWkXG7/hGmGE1FovyF26P8Yk2urRlrOxMw2MuBHOQwKr/IMle+ 6HbQ== 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=Nbn6ZPqkgK9dtSMellsW60riYifwyh558pvvalRPKrw=; b=B/L5XlxVnvQvYLtXz3nAAKcZI2cWehMUgf4kCWpT96YCmUuW2m2UhEAbdeOikdCn5Q Fcl/byUt05yVdss5rvNeLG8y4SpxQL/7K8zZt8YJNX4SwdcASV2T/FQMggQnV1vQhIYV zDXfbHk2lpbu2a21oI442Xj/F3mibtRQ3NTLZJzFwda8KxYgAo6eSfjw0yUcMZI3f4C1 1Rht/+LzcihL7LLxzFYRWyXiYHjJZLFwl93T6wnJ+84eBvV+ZVuHy/TbOWhWysVqw9fB 56PMNLEEct7stRPkA0SPBd6Pk7zm6MssYxoLoixXjM6RQ8pg5xcgCqc5j5nfrcjyOgpY KIig== X-Gm-Message-State: AOAM531gwaW6pIm9pjKLZo3D7qqBnvcxwVmuMNjv1BAKZ+kClZtlF/np 6tHTGgPqefv21R9qOGIAGrIEoopbgjPAJhiY6Gk= X-Google-Smtp-Source: ABdhPJy0Ly2Iny4PXe05m/prt89I1rf1FFGsHUuJxqu7RWbqp3XhREpyXk4ZcOVGXg2OkHxu3fCZawqTce83sSMl9Go= X-Received: by 2002:a50:cdcb:: with SMTP id h11mr7363084edj.366.1628631028846; Tue, 10 Aug 2021 14:30:28 -0700 (PDT) MIME-Version: 1.0 References: <20210810202936.2672-1-shy828301@gmail.com> <20210810202936.2672-3-shy828301@gmail.com> <3983c910-a02b-e67b-8c2b-7a379c3d22e1@google.com> In-Reply-To: <3983c910-a02b-e67b-8c2b-7a379c3d22e1@google.com> From: Yang Shi Date: Tue, 10 Aug 2021 14:30:17 -0700 Message-ID: Subject: Re: [PATCH 3/3] Revert "mm: swap: check if swap backing device is congested or not" To: Hugh Dickins Cc: Huang Ying , Miaohe Lin , Andrew Morton , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=JPzruZzk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf12.hostedemail.com: domain of shy828301@gmail.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=shy828301@gmail.com X-Stat-Signature: z958iythd7d345bmnyqjjzoa3uetznyj X-Rspamd-Queue-Id: 2ED0510003FC X-Rspamd-Server: rspam01 X-HE-Tag: 1628631030-669122 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, Aug 10, 2021 at 2:08 PM Hugh Dickins wrote: > > 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? It is fine, I think this one is the best elaborated the problem: https://lore.kernel.org/linux-mm/24187e5e-069-9f3f-cefe-39ac70783753@google.com/ > > 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