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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55212C433F5 for ; Thu, 17 Feb 2022 02:55:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B4466B0074; Wed, 16 Feb 2022 21:55:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 33B026B0075; Wed, 16 Feb 2022 21:55:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B4B76B0078; Wed, 16 Feb 2022 21:55:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 093FC6B0074 for ; Wed, 16 Feb 2022 21:55:00 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id BA34B22BBA for ; Thu, 17 Feb 2022 02:54:59 +0000 (UTC) X-FDA: 79150754718.02.26C553F Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf28.hostedemail.com (Postfix) with ESMTP id 2E221C0002 for ; Thu, 17 Feb 2022 02:54:59 +0000 (UTC) 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 4CC6FB820DC; 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 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=jUysxnMs; dmarc=none; spf=pass (imf28.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 2E221C0002 X-Stat-Signature: cqs17kk33ra4zze5qqju5czpndbth3ts X-HE-Tag: 1645066499-465738 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 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.