lkml.org 
[lkml]   [2023]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr()
On Wed, 11 Oct 2023 at 14:33, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> Reading the above, it looks to me that we don't want to play games
> with "const aliased" versions of current_task [1], as proposed by
> Nadav in his patch series.

Well, maybe I'd like it if I saw what the effect of it was, but that
patch mentions "sync_mm_rss()" which doesn't actually exist
(SPLIT_RSS_COUNTING is never defined, the split version is gone and
hasn't existed since commit f1a7941243c1 "mm: convert mm's rss stats
into percpu_counter")

I'm not sure why gcc used to get code generation wrong there, and I
don't see what could be improved in the current implementation of
'current_task', but I guess there could be things that could be done
to make gcc more likely to CSE the cases..

IOW, I don't understand why Navad's patch would improve gcc code gen.
It presumably depends on some gcc internal issue (ie "gcc just happens
to be better at optimization X").

Which is obviously a valid thing in general.

Linus

\
 
 \ /
  Last update: 2023-10-11 23:55    [W:0.187 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site