Re: flush_dcache_page vs kunmap_local
From: Linus Torvalds
Date: Thu Nov 04 2021 - 17:02:50 EST
On Thu, Nov 4, 2021 at 11:39 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Thu, Nov 04, 2021 at 08:30:55AM -0700, Linus Torvalds wrote:
> > Why did this come up? Do you actually have some hardware or situation
> > that cares?
>
> Oh, we're doing review of the XFS/iomap folio patches, which led to
> looking at zero_user_segments(), and I realised that memzero_page()
> was now functionally identical to zero_user(). And you'd been quite
> specific about not having flush_dcache_page() in there, so ... I wondered
> if you'd had a change of mind.
Ugh. I guess it ends up being there whether I like it or not. All that
"zero_user_segments() stuff is too ugly for words, though, so I think
whoever wrote it must have been on some interesting pharmaceuticals.
What the hell are the two start/end things? And most users actually
just want a single page and should never have used that thing. Nasty.
I'm not touching that with a ten-foot pole.
Linus