Re: [PATCH 2/9] timers: provide a "modern" variant of timers

From
Arnd Bergmann <arnd@arndb.de>
Date
2017-05-21 12:29:24
Also in
linux-s390, lkml
Reply to
Christoph Hellwig, 2017-05-21
On Sun, May 21, 2017 at 9:00 AM, Christoph Hellwig [off-list ref] wrote:
On Thu, May 18, 2017 at 10:57:31AM +0200, Arnd Bergmann wrote:
quoted
How expensive would it be to add another field to timer_list and
just have both pointers?
That would add 4/8 bytes to every structure containing a timer,
so I'd rather avoid it if possible.
I didn't expect too many timers to be in allocated structures at the same
time on most systems, but I haven't researched this at all.

We should probably update the comment about the cacheline alignment
though: when most users embed the timer_list in some other structure,
it's not valid at all, and forcing timer_list to be cacheline aligned would
waste way more space than an extra field.
 But one option might be to inflict this onto users of outdated compilers
and use the union for modern ones.
Good idea, this sounds better than the alternatives at least. The
remaining users of those old compilers certainly don't care that much
about micro-optimizing the kernel anyway.

       Arnd
Thread (39 messages) 39 messages, 7 authors, last reply 2017-05-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help