lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] mm: vmalloc: Add a per-CPU-zone infrastructure
On Tue, May 23, 2023 at 04:53:25PM +0200, Uladzislau Rezki wrote:
> > > +#define fbl_lock(z, i) spin_lock(&fbl(z, i, lock))
> > > +#define fbl_unlock(z, i) spin_unlock(&fbl(z, i, lock))
> >
> > Even if it is just temporary, I don't think adding these wrappers
> > make much sense.
> >
> If open-coded, it looks like:
>
> spin_lock(&z->fbl[BUSY].lock);

Give the fbl structure a name and you can have a local variable for it,
which will make all this a lot more readable. And then unless there is
a really good reason to iterate over this as an array just have three
of these structs embedded named free, busy and lazy.

\
 
 \ /
  Last update: 2023-05-23 17:15    [W:0.087 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site