From patchwork Wed Sep 15 18:14:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12497121 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 5DCB2C433EF for ; Wed, 15 Sep 2021 18:15:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB5E8600D4 for ; Wed, 15 Sep 2021 18:15:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DB5E8600D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6D74C6B0071; Wed, 15 Sep 2021 14:15:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6872E6B0072; Wed, 15 Sep 2021 14:15:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5283E6B0073; Wed, 15 Sep 2021 14:15:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id 439986B0071 for ; Wed, 15 Sep 2021 14:15:02 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D4A841844A875 for ; Wed, 15 Sep 2021 18:15:01 +0000 (UTC) X-FDA: 78590609202.08.05A3F9E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 606DA30000B6 for ; Wed, 15 Sep 2021 18:15:01 +0000 (UTC) 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-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-34-c6ezosQDMu2LscsUhzl9ww-1; Wed, 15 Sep 2021 14:14:59 -0400 X-MC-Unique: c6ezosQDMu2LscsUhzl9ww-1 Received: by mail-qk1-f198.google.com with SMTP id 81-20020a370954000000b00430e5d191b7so215182qkj.22 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=H5ZZx5T/Qy4APSqEq9zNKzVKirgi40K/xLMJYVjqcnbK6ps1K1dd06Cenw448LJ93l X9XRcNP6Pj0ws09g+P7S8lQ1lK7BmHv8cpIaMDvwcoBdRIXafuGJFNCK3txHErjeQbu9 nzXlpOwW/o/ACgsxdj4mHeNs+b54nItcU+7RfRn4gqpeDWrKeJFcd4HnBnBxFXIc7V+g DeEvtvZK80yZ3QW2vOALs0O/5G8tJPghnomsph+T0fTtn9duTEQqJJUR1JTfEMjUdYvl YQHRzz2AKGwakzjwsb+XT3IypF78L3wobJjNai+0tlj0EMrdeZMU1E8HBdH6E3aATS/q cwmQ== X-Gm-Message-State: AOAM533gI1hNJRjIVIOOKZxQ6HTmPlcYee/ML1qOfhsczYrpNZzY0V/y G3t4uDeJ+Dw4TktKaV/us5OV1vEBm2YGfC37YZoWUJGr/w7zp3x1zibgeHoLRiiJSJr2tVlddUK szcMja3oel9I= X-Received: by 2002:a37:a302:: with SMTP id m2mr1249724qke.155.1631729698827; Wed, 15 Sep 2021 11:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygAcwZ/9mrp33dvqbsNgM5BPn8uy9tVqgDqOBo2NkpqqmgJlMiHUZcL8gmQBvWnC27q6/KRg== 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 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Stat-Signature: ewp7uqrt7d4rwb3g11m6hsszdgut7xrd Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VBYj6F8x; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf03.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 606DA30000B6 X-HE-Tag: 1631729701-219318 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: [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(-)