Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp711380pxb; Wed, 15 Sep 2021 11:16:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy2E1GvXhtXgagfU+4WjVGT1hXfHBKz6ldTXL8/vcr7sx2EUHn1OrdnuWDaL0GIQOP2qDN X-Received: by 2002:a17:906:a0a:: with SMTP id w10mr1487046ejf.416.1631729811430; Wed, 15 Sep 2021 11:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631729811; cv=none; d=google.com; s=arc-20160816; b=Hm5uZzqNolPV6l1zGO15Bf63OZIv8UQLSzscdZT4SRG7qLnPDU5u2deI9MYNH+bkRB uU6oi4X9NQ43eQslAdpGxTmbw4dd0stvxtkgpEkgqhIpzVNwI2STxi5d8WBURy0yNDM2 0cMX6YoIxu9SdzxADiq2vLpq9typzUGGcBRG6r5UScAhgrCS0dRuZUcaEcNDAlBPoTGf yUXbMTjrn2IU0SWKX0oS8RbDfpZwnJnBPRK8vXoOgssvA6UpiPQcJTO/MlXBEMDXeVZH Nguh9L3UPy2LxF3zuUqwxnY940m3r3Y9Y8bDoGnQmtmf6omLuA5OyAXlvyJRwy8hTbuX tejg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4ea19EVT7+ENaTSXfaPbkEFbFvLGTZXZZbGxxKzThbk=; b=eCMp6cVZdpZ8WLI0Gw1xsH1faHsDkjRaSCesqr5LaQUouTbn1l7NBHG2FsbEEqD+eg W9HCihfpSMxGKbHK1lQHaSKjovHuTQipX8hjIRHdBUEmxegBYPnmf+9YhaTPaHjnOsas WODLCoY3SebJznwOXdvDe1tzBZhC/oaiQvF+iNagrKAALNlm2iUFkPL3rKSW8ReeoMBR LBVx+fqFrqPXI0Clg/9i0U1dckTmwTAKd3+xGWr2zMsqhGmEniWCiqWvqmf/dqthULkp p0nmUl3weY04VP4WsGBFMvfiMuAYILwj9cJNzIGO9m3H/Sff2c9SZx26HHofnIkuaUpg KN8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VBYj6F8x; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si731897edo.477.2021.09.15.11.16.26; Wed, 15 Sep 2021 11:16:51 -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=@redhat.com header.s=mimecast20190719 header.b=VBYj6F8x; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230142AbhIOSQV (ORCPT + 99 others); Wed, 15 Sep 2021 14:16:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23140 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbhIOSQU (ORCPT ); Wed, 15 Sep 2021 14:16:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631729700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ea19EVT7+ENaTSXfaPbkEFbFvLGTZXZZbGxxKzThbk=; b=VBYj6F8x9qMkz1io7vUPF3Ryg+YZPNdz+4Wn+03lViQo0nW9PIQpmeSUsEW5JuVLIeTk3F wGd2PiLFy4zlXeucvzXgXoEMOg/6GpF80CWswYJZ6TzsuIhLc5suCbrzwX1WlBGxwNrn3o d563gnVmXVwRWi6DTJqTCbwYgPfi47A= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-126-xxJA00I7Pw-SN5wgpDq7FQ-1; Wed, 15 Sep 2021 14:14:59 -0400 X-MC-Unique: xxJA00I7Pw-SN5wgpDq7FQ-1 Received: by mail-qk1-f199.google.com with SMTP id 70-20020a370b49000000b003d2f5f0dcc6so6033734qkl.9 for ; Wed, 15 Sep 2021 11:14:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4ea19EVT7+ENaTSXfaPbkEFbFvLGTZXZZbGxxKzThbk=; b=RgN90B3qMrso1ha2FgIOLTNloipPxPw/9xtYi+7FdoyvzmEqrT9yGUN8SQErHRSMti 9n3hkuJ36xAR4ZOIxzom2fJIiRV6iAhCkkPvT48oO6n7q9/ID6Sr4Ebd+QAmUbA9/T47 2nooQn2/lq2rOyur3kzS3PMGRkHL1Uh0E9JBg3QA3Iw3fbQ4Sq1IrE2R0biQqYg3lv8L 0lhEjwGsmYPORXwM9UeFP5NmBC5wK2wD94en82PKf0us+6xb5bOPZ2asPK8+9vNgrdPu vFkC+qCJ4D/AGgVH6beiFXgMRzM/lXTAdUTL7KMkvRcmYTpcL7w+Vk5jQsxegwwc+Gy+ VHbg== X-Gm-Message-State: AOAM530wJ+iksUuwvecTAN2LIUDhMzisRHlRI6xGNKJr9vCw5AL0XxGk av0KwDcMk2o/fTzU2x7nuuR96zF5N4FSElp2toBs61G8LQHP40EpG6hVwNPLf7SmXgPSY+iq6j1 +lxRFEVXl/PuqoP9YqsKR5iOr X-Received: by 2002:a37:a302:: with SMTP id m2mr1249718qke.155.1631729698826; Wed, 15 Sep 2021 11:14:58 -0700 (PDT) X-Received: by 2002:a37:a302:: with SMTP id m2mr1249691qke.155.1631729698554; Wed, 15 Sep 2021 11:14:58 -0700 (PDT) Received: from t490s.redhat.com ([2607:fea8:56a2:9100::d35a]) by smtp.gmail.com with ESMTPSA id n18sm578663qkn.63.2021.09.15.11.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 11:14:58 -0700 (PDT) From: Peter Xu To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, Andrea Arcangeli , Liam Howlett , Hugh Dickins , Mike Rapoport , Yang Shi , David Hildenbrand , "Kirill A . Shutemov" , Jerome Glisse , Alistair Popple , Miaohe Lin , Matthew Wilcox Subject: [PATCH v4 0/4] mm: A few cleanup patches around zap, shmem and uffd Date: Wed, 15 Sep 2021 14:14:52 -0400 Message-Id: <20210915181456.10739-1-peterx@redhat.com> X-Mailer: git-send-email 2.31.1 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Based on v5.14-rc1] Hi, Andrew, I dropped patch 5 and will do it later when it justifies itself better. Each patch of this series now contains at least 1 R-b, would you consider merge it? Thanks, v4: - Patch "mm: Drop first_index/last_index in zap_details" - Put first_index and last_index into two lines [Liam] - Pick up r-bs - Drop patch 5 for future v3: - Patch "mm: Add zap_skip_check_mapping() helper" - In zap_skip_check_mapping() check zap_mapping first [Alistair] - Patch "mm: Add ZAP_FLAG_SKIP_SWAP and zap_flags": - Fix English errors in commit message [David] - Drop paragraph mentioning commit 22061a1ffabd in commit msg - Set ZAP_FLAG_SKIP_SWAP for unmap_mapping_page() too - Pick up r-bs v2: - Patch "mm: Clear vmf->pte after pte_unmap_same() returns" - Remove one comment [David] - Collect r-b for patch 2/3 - Rewrite the last two patches to drop ZAP_FLAG_CHECK_MAPPING, dropping Alistair's r-b on patch 5 because it changed [David, Matthew] ===== v1 cover letter ===== I picked up these patches from uffd-wp v5 series here: https://lore.kernel.org/lkml/20210715201422.211004-1-peterx@redhat.com/ IMHO all of them are very nice cleanups to existing code already, they're all small and self-contained. They'll be needed by uffd-wp coming series. I would appreciate if they can be accepted earlier, so as to not carry them over always with the uffd-wp series. I removed some CC from the uffd-wp v5 series to reduce the noise, and added a few more into it. Reviews are greatly welcomed, thanks. Peter Xu (4): mm/shmem: Unconditionally set pte dirty in mfill_atomic_install_pte mm: Clear vmf->pte after pte_unmap_same() returns mm: Drop first_index/last_index in zap_details mm: Add zap_skip_check_mapping() helper include/linux/mm.h | 18 ++++++++++-- mm/memory.c | 72 +++++++++++++++++++--------------------------- mm/shmem.c | 1 - mm/userfaultfd.c | 3 +- 4 files changed, 46 insertions(+), 48 deletions(-) -- 2.31.1