[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <631940536d040_2736529437@dwillia2-xfh.jf.intel.com.notmuch>
Date: Wed, 7 Sep 2022 18:07:31 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Davidlohr Bueso <dave@...olabs.net>
CC: <dan.j.williams@...el.com>, <x86@...nel.org>,
<nvdimm@...ts.linux.dev>, <linux-cxl@...r.kernel.org>,
<peterz@...radead.org>, <bp@...en8.de>, <dave.jiang@...el.com>,
<Jonathan.Cameron@...wei.com>, <vishal.l.verma@...el.com>,
<ira.weiny@...el.com>, <a.manzanares@...sung.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] memregion: Add arch_flush_memregion() interface
Andrew Morton wrote:
> I really dislike the term "flush". Sometimes it means writeback,
> sometimes it means invalidate. Perhaps at other times it means
> both.
>
> Can we please be very clear in comments and changelogs about exactly
> what this "flush" does. With bonus points for being more specific in the
> function naming?
>
That's a good point, "flush" has been cargo-culted along in Linux's
cache management APIs to mean write-back-and-invalidate. In this case I
think this API is purely about invalidate. It just so happens that x86
has not historically had a global invalidate instruction readily
available which leads to the overuse of wbinvd.
It would be nice to make clear that this API is purely about
invalidating any data cached for a physical address impacted by address
space management event (secure erase / new region provision). Write-back
is an unnecessary side-effect.
So how about:
s/arch_flush_memregion/cpu_cache_invalidate_memregion/?
Powered by blists - more mailing lists