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 X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 6FFC7C433EF for ; Wed, 15 Sep 2021 04:01:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1897D60E9B for ; Wed, 15 Sep 2021 04:01:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1897D60E9B 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 A76646B0071; Wed, 15 Sep 2021 00:01:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A2671940007; Wed, 15 Sep 2021 00:01:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C796900002; Wed, 15 Sep 2021 00:01:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0226.hostedemail.com [216.40.44.226]) by kanga.kvack.org (Postfix) with ESMTP id 7D1A86B0071 for ; Wed, 15 Sep 2021 00:01:41 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 28CDC1831E3F8 for ; Wed, 15 Sep 2021 04:01:41 +0000 (UTC) X-FDA: 78588458802.01.00F1546 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf25.hostedemail.com (Postfix) with ESMTP id CE90FB000183 for ; Wed, 15 Sep 2021 04:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631678500; 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: in-reply-to:in-reply-to:references:references; bh=S9dfG7lCjbIPE3UCUF5+rBdd5RDuUrQqvL6WJoW4FK4=; b=GXehgp3EQhWZZEZgr21JUIXrZqZUaMgBlX3OZ+XxRwfLUMyZXNiOyJPhQUl3WU9w0bdUZX QaCM9W54rH9AmUCxrh+UI+ulaIIfSgczR7NLkZEKz4AbOxrScuoA+eCvYM/87aFwheBUCq Wvz7ZtgxYPY11ntZF+gt+C4LsX7QFok= Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-TnpUBM0sPqaqYHQmIYtUfw-1; Wed, 15 Sep 2021 00:01:30 -0400 X-MC-Unique: TnpUBM0sPqaqYHQmIYtUfw-1 Received: by mail-io1-f70.google.com with SMTP id n189-20020a6b8bc6000000b005b92c64b625so829785iod.20 for ; Tue, 14 Sep 2021 21:01:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=S9dfG7lCjbIPE3UCUF5+rBdd5RDuUrQqvL6WJoW4FK4=; b=e95kWH8qikY4B/Qin0R62d7aeO4iI3ScDsghDcTiI7lX/C9eE90Gi59PIF7zFFftpG You1uye92tJ+dhBkoVMgGyIgkNlJ1yVIVE+8tTEftq4fQKyZw3lPYpcNv3BjwgJRNXee koDqT+jxReR5gNvuzwfHxGRbIVRCo1tKMGB3yy7Iy8iqLbowAAv7Xv0tnPE/3IBIS1Iv T5bfVq4cim9GzDA1p6Mw7xHfjK41spjHhHMQump7NU8jYlYVHWkHVxOQnPXcTJRLp5Dk gESeGG4x32ApbprjUruxknevVgX5rLqKkTGyURq6jktKeX+CUg3fAK6B//cIHKRKAEh9 imoA== X-Gm-Message-State: AOAM532fj1U3caxRPCkYkCGlU9QY8kXYU15BrQVocRSKhOfrpkdaweXh 8hl4RLp/iMkxv0FdAGQJcwUYIvy0SpKpBlKfgSIUdSTmOngpaMPcZXMsuWLSpzH8F8Y1bCVBO3I /ElQii27sdBk= X-Received: by 2002:a6b:5a08:: with SMTP id o8mr3643432iob.35.1631678489344; Tue, 14 Sep 2021 21:01:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLc18r6Nzd78R4QD2X5j5xamAcB5xT+admlIK+WELr04EisOSgNFcAvGwqNShkdwopm5vIIg== X-Received: by 2002:a6b:5a08:: with SMTP id o8mr3643403iob.35.1631678489059; Tue, 14 Sep 2021 21:01:29 -0700 (PDT) Received: from xz-m1.local ([2607:fea8:56a2:9100:358a:bf89:d33a:76ad]) by smtp.gmail.com with ESMTPSA id x5sm7656139ioa.35.2021.09.14.21.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 21:01:28 -0700 (PDT) Date: Wed, 15 Sep 2021 00:01:24 -0400 From: Peter Xu To: Alistair Popple Cc: linux-kernel@vger.kernel.org, Andrew Morton , Hugh Dickins , linux-mm@kvack.org, Miaohe Lin , David Hildenbrand , Andrea Arcangeli , Yang Shi , Matthew Wilcox , "Kirill A . Shutemov" , Jerome Glisse , Liam Howlett , Mike Rapoport Subject: Re: [PATCH v3 5/5] mm: Add ZAP_FLAG_SKIP_SWAP and zap_flags Message-ID: References: <20210908163516.214441-1-peterx@redhat.com> <2576475.WBpAVSM2eX@nvdebian> <2497776.C4p5gPNQJS@nvdebian> MIME-Version: 1.0 In-Reply-To: <2497776.C4p5gPNQJS@nvdebian> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GXehgp3E; spf=none (imf25.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: rspam06 X-Rspamd-Queue-Id: CE90FB000183 X-Stat-Signature: gakgttispmg4s4umnedmnrq1jhaym8t4 X-HE-Tag: 1631678500-488579 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, Sep 15, 2021 at 01:21:30PM +1000, Alistair Popple wrote: > On Wednesday, 15 September 2021 12:52:48 PM AEST Peter Xu wrote: > > > > > The flag introduced in this patch will be a preparation for more bits defined > > > > in the future, e.g., for a new bit in flag to show whether to persist the > > > > upcoming uffd-wp bit in pgtable entries. > > > > > > That's kind of the problem. The patch itself looks correct to me however as > > > mentioned it is mostly reverting a previous cleanup and it's hard to tell why > > > that's justified without the subsequent patches. Perhaps it makes the usage of > > > zap_details a bit clearer, but a comment also would with less code. > > > > > > I know you want to try and shrink the uffd-wp series but I think this patch > > > might be easier to review if it was included as part of that series. > > > > I posted it because I think it's suitable to have it even without uffd-wp. > > > > I tried to explain it above on two things this patch wanted to fix: > > > > Firstly the comment is wrong; we've moved back and forth on changing the > > zap_details flags but the comment is not changing along the way and it's not > > matching the code right now. > > > > Secondly I do think we should have a flag showing explicit willingness to skip > > swap entries. Yes, uffd-wp is the planned new one, but my point is anyone who > > will introduce a new user of zap_details pointer could overlook this fact. The > > new flag helps us to make sure someone will at least read the flags and know > > what'll happen with it. > > > > For the 2nd reasoning, I also explicitly CCed Kirill too, so Kirill can provide > > any comment if he disagrees. For now, I still think we should keep having such > > a flag otherwise it could be error-prone. > > > > Could you buy-in above reasoning? > > Kind of, I do think it makes the usage of details a bit clearer or at least > harder to miss. It is just that if that was the sole aim of this patch I think > there might be simpler (less code) ways of doing so. Yes you're right, we can add a big enough comment above zap_details to state that, but then it'll be reverted when adding the uffd-wp flag in the other series, because uffd-wp will still needs a way to specify !SKIP_SWAP and KEEP_UFFD_WP. Then it'll make the "series split" make less sense as you said. I split the series only because I hope it could ease the reviewers, and also that's probably the only thing I can do now to still try to smooth the process of having a complete uffd-wp finally got proper reviewed and merged. > > > Basically above is what I wanted to express in my commit message. I hope that > > can justify that this patch (even if extremly simple) can still be considered > > as acceptable upstream even without uffd-wp series. > > > > If you still insist on this patch not suitable for standalone merging and > > especially if some other reviewer would think the same, I can move it back to > > uffd-wp series for sure. Then I'll repost this series with 4 patches only. > > I won't insist, the code looks correct and it doesn't make things any less > clear so you can put my Reviewed-by on it and perhaps leave it to Andrew or > another reviewer to determine if this should be taken in this series or as part > of a future uffd-wp series. Will do; thanks. -- Peter Xu