Re: alignment requirements for kmutex_t

2025-04-04 Thread Jason Thorpe
> On Mar 30, 2025, at 1:14 AM, Beesdeckar wrote: > > Hello, > I found that global variable of type kmutex_t is on many places defined like: > kmutex_t variable_name __cacheline_aligned; > > Two questions, > 1. Is __cacheline_aligned mandatory for global/static variables of type > kmutex in ke

Re: alignment requirements for kmutex_t

2025-03-31 Thread Stephan
Hello, maybe the attribute(3) man page is helpful to you too for these kinds of things. Stephan Am So., 30. März 2025 um 11:54 Uhr schrieb Beesdeckar : > > Hello, > I found that global variable of type kmutex_t is on many places defined > like: > kmutex_t variable_name __cacheline_aligned; > >

Re: alignment requirements for kmutex_t

2025-03-30 Thread Jörg Sonnenberger
On 3/30/25 10:14 AM, Beesdeckar wrote: Hello, I found that global variable of type kmutex_t is on many places defined like: kmutex_t variable_name __cacheline_aligned; Two questions, 1. Is __cacheline_aligned mandatory for global/static variables of type kmutex in kernel space ? No, it's a

alignment requirements for kmutex_t

2025-03-30 Thread Beesdeckar
Hello, I found that global variable of type kmutex_t is on many places defined like: kmutex_t variable_name __cacheline_aligned; Two questions, 1. Is __cacheline_aligned mandatory for global/static variables of type kmutex in kernel space ? 2. Regarding to alignment what are requirements for k