Re: [RFC][PATCH 5/7] irq_work, smp: Allow irq_work on call_single_queue
From: Peter Zijlstra
Date: Fri Jun 05 2020 - 12:18:32 EST
On Fri, Jun 05, 2020 at 05:02:08PM +0200, Frederic Weisbecker wrote:
> On Fri, Jun 05, 2020 at 11:37:04AM +0200, Peter Zijlstra wrote:
> > struct irq_work {
> > - struct llist_node llnode;
> > - atomic_t flags;
> > + union {
> > + struct __call_single_node node;
> > + struct {
> > + struct llist_node llnode;
> > + atomic_t flags;
> > + };
> > + };
>
> So why not just embed struct __call_single_node in
> struct irq_work and struct __call_single_data ?
>
> Is the point of that anonymous second union layer to
> shorten the lines while accessing members?
To cut down on all the churn. irq_work is small and could easily be
fixed up, but csd is used in quite a few places.