[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a004SX_cAc1hcbx4wdRMEhmzp=w1wasiRy3UvexskQ5dA@mail.gmail.com>
Date: Sun, 21 May 2017 14:29:21 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Christoph Hellwig <hch@....de>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Mark Gross <mark.gross@...el.com>, Tejun Heo <tj@...nel.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
linux-s390 <linux-s390@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/9] timers: provide a "modern" variant of timers
On Sun, May 21, 2017 at 9:00 AM, Christoph Hellwig <hch@....de> wrote:
> On Thu, May 18, 2017 at 10:57:31AM +0200, Arnd Bergmann wrote:
>> 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
Powered by blists - more mailing lists