Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp30146pxb; Wed, 16 Feb 2022 20:47:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdtr+y4IPGTk/fjuHsG0jmTBsBog+pjsTmCTUx7tLB+B/g5kFpnqyUl+urmVnDDKjQJbG0 X-Received: by 2002:a05:6a00:21ca:b0:4c9:ff9:47e3 with SMTP id t10-20020a056a0021ca00b004c90ff947e3mr1485600pfj.10.1645073266233; Wed, 16 Feb 2022 20:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645073266; cv=none; d=google.com; s=arc-20160816; b=KkfsdmMU71ZDFe4zN52HPjStGxOHtR/gG40iwMVSr+sNFxU6kwTvK8MRHU5EPXoVuy IFkzP7L85NXA0RBBRJ83rRGpPpV0JwcklZh9wu9ooeCbvGr7ltvft0CNXRkiPLi83ldv qvdL6cIZhKpdj55PyGv+urN2eU1SsoelF6UCY9vLFc+6VdlvQasmTbcDEHKOU3JedAhP l42vYeKzfWwZ1vK5nW6Ky0E5JHcvakHD6fZNC30bpg0wQ5OxsAYhnf/WddYCubW6mVK7 bBoFdQhPT/IrH5a/2mhuHhhZizZBkj3HW0CfUqTtRP1dBUB2sfTiANZO5TCmSe4yfrIN kVeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=84/mXn5l6MPHqCxP5ba5aSg9mIQ/+83u8S48mErRnN8=; b=U4fpKIgbET/MknYtJ8hqJQSL7lHcRxynYcqTY7VOhjrZYKOBaatoFA06r9vi/p3CiF EdDPgnP4KfL3MXUOigGUOT953bQGD/wX40q/TiJkYZvfalv6yImShoHfJDC/RH8toTEH 8ut4WyKULDKeQnSRTTLYVW2R3SOcqbNT0Uq463UyUBvPyIUnwpK8fAzs++15XA8gcWWa lSOsIfn3RughuRalw1I3/DU+4U1LGTm16Eg+a/EqIbypxAdUb8YEMc1vYbGO+NbhzVeG lWXlPTv5BIGkZmyJ5Vj7tmjVaaQ7GiZkiU5/N0pSWAbnIrl7XIVpX4cDZSZvrgUrbe87 hk+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=jUysxnMs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6si747810pjp.169.2022.02.16.20.47.29; Wed, 16 Feb 2022 20:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=jUysxnMs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231981AbiBQCzM (ORCPT + 99 others); Wed, 16 Feb 2022 21:55:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231570AbiBQCzL (ORCPT ); Wed, 16 Feb 2022 21:55:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95F4B2A82F0 for ; Wed, 16 Feb 2022 18:54:58 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4AA48B820CC for ; Thu, 17 Feb 2022 02:54:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D06AC340EC; Thu, 17 Feb 2022 02:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1645066496; bh=e6sQNtm0v2zWcewdkxMwUJXz1rBzzyDaIVcOGsQnXz8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jUysxnMsYWiv9peO3Df9BtpTtnwQzcuRDVqPKzp0riRCqWKtmRUB0X12sZx9OI2N5 rOziFtfdyzBNr9lH0PzZkVjszwVrypvVIrnjxbX2Pdd5ki3vG9N/OU3CY3dUpEHOmP /GUAeIgS/tM38JfAAZ2HkXZ90Fw7m38k2x51VDhY= Date: Wed, 16 Feb 2022 18:54:55 -0800 From: Andrew Morton To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A . Shutemov" , Matthew Wilcox , Yang Shi , Andrea Arcangeli , John Hubbard , Alistair Popple , David Hildenbrand , Vlastimil Babka , Hugh Dickins Subject: Re: [PATCH v4 1/4] mm: Don't skip swap entry even if zap_details specified Message-Id: <20220216185455.c5af4f44f90b103971f34e1f@linux-foundation.org> In-Reply-To: <20220216094810.60572-2-peterx@redhat.com> References: <20220216094810.60572-1-peterx@redhat.com> <20220216094810.60572-2-peterx@redhat.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Feb 2022 17:48:07 +0800 Peter Xu wrote: > The "details" pointer shouldn't be the token to decide whether we should skip > swap entries. For example, when the user specified details->zap_mapping==NULL, > it means the user wants to zap all the pages (including COWed pages), then we > need to look into swap entries because there can be private COWed pages that > was swapped out. I assume "user" here means "caller". > Skipping some swap entries when details is non-NULL may lead to wrongly leaving > some of the swap entries while we should have zapped them. > > A reproducer of the problem: > > ... > > The issue seems to exist starting from the initial commit of git. I'll add cc:stable to this one, thanks.