[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d0a38982-b811-4429-8b89-81e5da3aaf72@google.com>
Date: Thu, 31 Oct 2024 18:44:46 -0700
From: Junaid Shahid <junaids@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Brendan Jackman <jackmanb@...gle.com>, Borislav Petkov <bp@...en8.de>
Cc: Ingo Molnar <mingo@...hat.com>, Dave Hansen
<dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>, Peter Zijlstra <peterz@...radead.org>,
Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, Alexandre Chartre <alexandre.chartre@...cle.com>,
Liran Alon <liran.alon@...cle.com>,
Jan Setje-Eilers <jan.setjeeilers@...cle.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Andrew Morton <akpm@...ux-foundation.org>, Mel Gorman <mgorman@...e.de>,
Lorenzo Stoakes <lstoakes@...il.com>, David Hildenbrand <david@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>, Michal Hocko <mhocko@...nel.org>,
Khalid Aziz <khalid.aziz@...cle.com>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Valentin Schneider <vschneid@...hat.com>, Paul Turner <pjt@...gle.com>,
Reiji Watanabe <reijiw@...gle.com>, Ofir Weisse <oweisse@...gle.com>,
Yosry Ahmed <yosryahmed@...gle.com>, Patrick Bellasi <derkling@...gle.com>,
KP Singh <kpsingh@...gle.com>, Alexandra Sandulescu <aesa@...gle.com>,
Matteo Rizzo <matteorizzo@...gle.com>, Jann Horn <jannh@...gle.com>,
x86@...nel.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
kvm@...r.kernel.org
Subject: Re: [PATCH 01/26] mm: asi: Make some utility functions noinstr
compatible
On 10/29/24 12:12 PM, Thomas Gleixner wrote:
>
> I doubt that it works as you want it to work.
>
> + inline notrace __attribute((__section__(".noinstr.text"))) \
>
> So this explicitely puts the inline into the .noinstr.text section,
> which means when it is used in .text the compiler will generate an out-of
> line function in the .noinstr.text section and insert a call into the
> usage site. That's independent of the size of the inline.
>
Oh, that's interesting. IIRC I had seen regular (.text) inline functions get
inlined into .noinstr.text callers. I assume the difference is that here the
section is marked explicitly rather than being implicit?
In any case, I guess we could just mark these functions as plain noinstr.
(Unless there happens to be some other way to indicate to the compiler to place
any non-inlined copy of the function in .noinstr.text but still allow inlining
into .text if it makes sense optimization-wise.)
Thanks,
Junaid
Powered by blists - more mailing lists