From: Peter Xu <peterx@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: Yang Shi <shy828301@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>,
Vlastimil Babka <vbabka@suse.cz>,
Jerome Marchand <jmarchan@redhat.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Hugh Dickins <hughd@google.com>, Jason Gunthorpe <jgg@nvidia.com>,
John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH v1] mm/gup: adjust stale comment for RCU GUP-fast
Date: Fri, 2 Sep 2022 09:53:11 -0400 [thread overview]
Message-ID: <YxIKxy5RIp36HuOf@xz-m1.local> (raw)
In-Reply-To: <2368d91f-8442-076f-f33a-64b51b44825c@redhat.com>
On Fri, Sep 02, 2022 at 08:32:42AM +0200, David Hildenbrand wrote:
> Note that this matches ptep_get_and_clear() behavior on s390x. Quoting the comment in there:
>
>
> /*
> * This is hard to understand. ptep_get_and_clear and ptep_clear_flush
> * both clear the TLB for the unmapped pte. The reason is that
> * ptep_get_and_clear is used in common code (e.g. change_pte_range)
> * to modify an active pte. The sequence is
> * 1) ptep_get_and_clear
> * 2) set_pte_at
> * 3) flush_tlb_range
> * On s390 the tlb needs to get flushed with the modification of the pte
> * if the pte is active. The only way how this can be implemented is to
> * have ptep_get_and_clear do the tlb flush. In exchange flush_tlb_range
> * is a nop.
> */
Ah, now I kind of see why s390 has its own world of pte operations.
But then we really should be noted on reworking the generic tlb code
because s390 is always special; people will think the generic tlb API is
for tlb but no-op for s390, e.g. anyone optimizes generic tlb flushing
it'll probably never apply to s390.
Besides performance, hopefully there'll be no case where the tlb change
will be functional then it may affect s390 too. But I don't see any since
as long as tlb was flushed earlier than the API then it seems always safe.
Just trickier.
--
Peter Xu
next prev parent reply other threads:[~2022-09-02 13:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 7:21 David Hildenbrand
2022-09-01 14:37 ` Kirill A . Shutemov
2022-09-01 16:12 ` Jason Gunthorpe
2022-09-01 16:30 ` David Hildenbrand
2022-09-01 16:28 ` Peter Xu
2022-09-01 16:34 ` David Hildenbrand
2022-09-01 16:40 ` Peter Xu
2022-09-01 16:46 ` David Hildenbrand
2022-09-01 17:41 ` Peter Xu
2022-09-01 17:44 ` David Hildenbrand
2022-09-01 17:50 ` Yang Shi
2022-09-01 18:07 ` Peter Xu
2022-09-01 18:35 ` Yang Shi
2022-09-02 6:32 ` David Hildenbrand
2022-09-02 13:53 ` Peter Xu [this message]
2022-09-02 15:37 ` Yang Shi
2022-09-04 16:52 ` Aneesh Kumar K V
2022-09-05 8:38 ` David Hildenbrand
2022-09-05 8:41 ` Aneesh Kumar K V
2022-09-04 16:49 ` Aneesh Kumar K V
2022-09-05 8:02 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YxIKxy5RIp36HuOf@xz-m1.local \
--to=peterx@redhat.com \
--cc=aarcange@redhat.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=jgg@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=jmarchan@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shy828301@gmail.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox