[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4bc8cab6-4e1a-c3b9-0023-3ecde932cc70@intel.com>
Date: Mon, 3 Dec 2018 09:53:00 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Dan Williams <dan.j.williams@...el.com>, tglx@...utronix.de
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/5] generic/pgtable: Introduce set_pte_safe()
On 11/30/18 4:35 PM, Dan Williams wrote:
> +/*
> + * The _safe versions of set_{pte,pmd,pud,p4d,pgd} validate that the
> + * entry was not populated previously. I.e. for cases where a flush-tlb
> + * is elided, double-check that there is no stale mapping to shoot down.
> + */
Functionally these look great to me.
The only thing I'd suggest is to make the comment more about when to use
these, instead of what they do:
Use the set_p*_safe() version when confident that *no*
TLB flush will be required as a result of the "set", such
as setting non-present entries or when possibly superfluously
re-setting an entry.
Powered by blists - more mailing lists