Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3910778pxt; Tue, 10 Aug 2021 14:32:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmNw7dURkcxloe4yyGCxT8rnK8lNChnfoIMFBOJ1YFaDCkVkBUMUYTSQ0Ofpdl04M+yent X-Received: by 2002:a05:6402:270a:: with SMTP id y10mr7321584edd.385.1628631173650; Tue, 10 Aug 2021 14:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628631173; cv=none; d=google.com; s=arc-20160816; b=dHzY5F679HXnzMbKxITkPui58T7MEexgoZm0lL0tEgCWA0izjs+4su3y008U/CvOEw 9VJBctR2ki3gVriXEsefvFWvFKsnzyrJaUDIJsigBgiK0bFH9cluqKq0u46dR163nNdl 7X5W7UC1/W8PFNHf6hNCZwGAdsOsKmETO9Yx9RXFWI8VpVDVfCFbSnYcnNsr8J0/MZSd SASh8brOThi1ct3JDjQd8PcFBLrEKP6C4ibxciLmetc7UiTTpLugqGUhqNzhOV+r2Fgw TJRA+yKFEf9BZ8nMG/KPgparA9iFdlePGZMbYGFGMfLiTvFpNqQyst4t6f82HNj/1B8o cFSQ== 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=Nbn6ZPqkgK9dtSMellsW60riYifwyh558pvvalRPKrw=; b=g3/DAyeiw1mGTE+8WdJIOiPJ2E4lsSSmrzy2dAuzpJXQMOuyXyDHXs7fcgbloFUDrX ITaOAVky4tjGUx6/lzg7Z2H0DNCyAEyWmjPX2yu/jTVdsM/oknIFMtV39UDmD+aRR1mn YIScx4twNb6N7sXheBoDFfpB2wGqy27cHm1DZCxJiuE+fPaz5vToKk8CAWd8c7Izrnez Ao8muIdF4llrnutVbomDVGYBlMXPksluNAtKO19W+/5GteIUtPNO8a0BFq64x+FD34bY tkKXbG67+BHFRMWMB2bwfWM5xaaenEBzp80P2vHqxQjNgcARqSjmYcMd8k8UebH5AwtP xIsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JPzruZzk; 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 q7si5261372eji.217.2021.08.10.14.32.26; Tue, 10 Aug 2021 14:32:53 -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=JPzruZzk; 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 S234531AbhHJVax (ORCPT + 99 others); Tue, 10 Aug 2021 17:30:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233895AbhHJVaw (ORCPT ); Tue, 10 Aug 2021 17:30:52 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3110CC0613C1 for ; Tue, 10 Aug 2021 14:30:30 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id k9so155944edr.10 for ; Tue, 10 Aug 2021 14:30:30 -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=QRXFp+o4d9sMkL9xTN3CodA8gj3UNgqM3o13s2CRLmtigLBs4+sJLfXe6qC1v+15Ml WvHVponmqU64Gz7ZASEEu7Yu272+Yr4w0ESWYyfaDYdju1CLgrt8MLAELd3vnW331Ynr vnHxiegafIVLtU8MVQ5a6UVNn1YR6VgOgHlNn6Nr32gjYHbe9NXa2a2lQzhCr8F/evjM DkThpASFykGGw8/c6bQr2RafGq3anwUNDHTiiB6f/b9cdioVvVFLyqDQnLT11fh+jFVT L05lvkREICXOLw8mp5hPvK8CtvzEg9ecjK7oG/m5t3KmSHqQUjXB3BI9htYeKELC+ZQw AsKw== X-Gm-Message-State: AOAM5305elI//8gMZmTtAQ+SojfIGnGX8s4THy+/5OoDytURxu3vI9rn V7WmxaJcf5b3HajoOKt8xN6WYbHuVm1bBHn9eSI= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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