Re: [PATCH v2 1/6] mm/list_lru: don't pass unnecessary key parameters

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

 



On Thu, Sep 26, 2024 at 01:10:15AM GMT, Kairui Song wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
> 
> When LOCKDEP is not enabled, lock_class_key is an empty struct that
> is never used. But the list_lru initialization function still takes
> a placeholder pointer as parameter, and the compiler cannot optimize
> it because the function is not static and exported.
> 
> Remove this parameter and move it inside the list_lru struct. Only
> use it when LOCKDEP is enabled. Kernel builds with LOCKDEP will be
> slightly larger, while !LOCKDEP builds without it will be slightly
> smaller (the common case).
> 
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>

Acked-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>





[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