From patchwork Wed Sep 1 20:56:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12470313 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 782FFC432BE for ; Wed, 1 Sep 2021 20:56:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 12DA76108E for ; Wed, 1 Sep 2021 20:56:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 12DA76108E 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 3CBFB8D0002; Wed, 1 Sep 2021 16:56:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 37C268D0001; Wed, 1 Sep 2021 16:56:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 243098D0002; Wed, 1 Sep 2021 16:56:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 1170D8D0001 for ; Wed, 1 Sep 2021 16:56:29 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A82EA2041E for ; Wed, 1 Sep 2021 20:56:28 +0000 (UTC) X-FDA: 78540212856.13.863FFA2 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 5B1A7B000093 for ; Wed, 1 Sep 2021 20:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630529787; 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=WGwsIlLycH7PSrcqVoUAvpDy7fMTYvx3ViNhs8JGlmY=; b=OMOBnjAx4enbkbrjTF0m6MLg9ofWmYE80XIooJ5svkrVlRLEeYTfbzeYc6lMC1qiY/R195 vp3PgcIVVE+s+zLw56Lkshi2TopPAPhQ+Ckv1hvjYDG08DJT5+/jgfObw1V8q9mJc2VY60 LVnW2faVlABHRmINPV9rJ3CmHcIbgr4= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-338-4YyxRU6jNnqYJFGdakQw-w-1; Wed, 01 Sep 2021 16:56:26 -0400 X-MC-Unique: 4YyxRU6jNnqYJFGdakQw-w-1 Received: by mail-qt1-f198.google.com with SMTP id 13-20020ac8560d000000b0029f69548889so908571qtr.3 for ; Wed, 01 Sep 2021 13:56:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WGwsIlLycH7PSrcqVoUAvpDy7fMTYvx3ViNhs8JGlmY=; b=dl6CcJuw1yUHasZ5NUdYSbHs9Dci8gOt9b+lwJL4IOOgyZfuhdNcsW8c6iAdl2v2wZ RzjAuatQbWxP4oPxEnDK26XLkcvAIC5cp8WLN2TY8UAD8zInr968O+bz/HxhHxDZG4X9 EB0hjyiXfyd2CFPzvUmYcvATmKmjzvfG8GgSSRAYq+y5iKvSVc1NSXZkBwOWv0rG842e DNND6b/GaAt6cCfaAxzKYcUnEtkZFFvQXVO6iLZJrvk/7PbZEKtrpwoAcfhOJDEdo+4G 6vNjj7To840uS/j8C3YkScA9J/IKI5fPdJeDH80WVo/2/EIvBpg5ZN22CCCIPR4uhpg3 FCLQ== X-Gm-Message-State: AOAM533xOy3SMJNlQTb558dd3akMmyG+MLLJkHKXgPRrKmEhOaNZnzdT WPxr5aTfhWhumsjYXAKeo7ilOsXC0xTNrRxIO9Wt3EQXvtHQ4633fff8w3seKGRKzcm9r8EjrXo Z8t50L93IZtI= X-Received: by 2002:ac8:7245:: with SMTP id l5mr1401034qtp.206.1630529786203; Wed, 01 Sep 2021 13:56:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQTH3Fbbl+hADtQgnXA4liiinZEcwP8pJ7XE5SqXNAMbWQnOnFMhl0uVFwdcXf9zgb09DAWQ== X-Received: by 2002:ac8:7245:: with SMTP id l5mr1401003qtp.206.1630529785880; Wed, 01 Sep 2021 13:56:25 -0700 (PDT) Received: from t490s.redhat.com ([2607:fea8:56a3:500::ad7f]) by smtp.gmail.com with ESMTPSA id f3sm624865qti.65.2021.09.01.13.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Sep 2021 13:56:25 -0700 (PDT) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Andrea Arcangeli , Mike Rapoport , peterx@redhat.com, Jerome Glisse , Alistair Popple , Yang Shi , Andrew Morton , David Hildenbrand , Miaohe Lin , "Kirill A . Shutemov" , Matthew Wilcox , Hugh Dickins Subject: [PATCH 0/5] mm: A few cleanup patches around zap, shmem and uffd Date: Wed, 1 Sep 2021 16:56:17 -0400 Message-Id: <20210901205622.6935-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 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=OMOBnjAx; spf=none (imf19.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5B1A7B000093 X-Stat-Signature: wmhxygjerc6xmdjho7w451k6ntfemoh8 X-HE-Tag: 1630529788-412669 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 tag v5.14, but it should still apply to -mm too. If not, I can repost anytime] 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 (5): 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: Introduce zap_details.zap_flags mm: Introduce ZAP_FLAG_SKIP_SWAP include/linux/mm.h | 33 +++++++++++++++++-- mm/memory.c | 82 +++++++++++++++++++++------------------------- mm/shmem.c | 1 - mm/userfaultfd.c | 3 +- 4 files changed, 68 insertions(+), 51 deletions(-)