Re: [PATCH V4 2/2] rcu: Update jiffies in rcu_cpu_stall_reset()

From: Joel Fernandes
Date: Tue Aug 29 2023 - 21:05:44 EST


On Mon, Aug 28, 2023 at 11:12:49PM +0800, Huacai Chen wrote:
> Maybe putting
> nr_fqs_jiffies_stall before jiffies_force_qs is better, because I
> think putting an 'int' between two 'long' is wasting space. :)

Though it is a decent suggestion, moving it before jiffies_force_qs does not
make the structure smaller. Trying to outsmart the compiler seems not a good
idea when it is not really packing the structure.

Besides, I am not too worried about 4-byte holes considering the structure is
full of them and that ofl_lock is ____cacheline_internodealigned_in_smp which
adds a giant 55 byte hole to the structure. That should keep you at night if
you are worried about 4 byte holes.

And the total size of the structure on a 64-bit build is 3776 bytes so 4
bytes is about 1/10th of a percent. Puny.

So I'd rather leave nr_fqs_jiffies_stall where it is especially considering
it is more readable where it is. :-)

thanks,

- Joel


>
> Huacai
>
> >
> > Thanks.