Re: Number of arguments in vmalloc.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/28/18 3:01 PM, Matthew Wilcox wrote:
> 
> Some of the functions in vmalloc.c have as many as nine arguments.
> So I thought I'd have a quick go at bundling the ones that make sense
> into a struct and pass around a pointer to that struct.  Well, it made
> the generated code worse,

Worse in which metric?

> so I thought I'd share my attempt so nobody
> else bothers (or soebody points out that I did something stupid).

I guess in some of the functions the args parameter could be const?
Might make some difference.

Anyway this shouldn't be a fast path, so even if the generated code is
e.g. somewhat larger, then it still might make sense to reduce the
insane parameter lists.

> I tried a few variations on this theme; bundling gfp_t and node into
> the struct made it even worse, as did adding caller and vm_flags.  This
> is the least bad version.
> 
> (Yes, the naming is bad; I'm not tidying this up for submission, I'm
> showing an experiment that didn't work).
> 
> Nacked-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux