Re: [PATCH] mm: avoid possible multiple call to swap_node()

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

 



Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> On Thu, Sep 17, 2020 at 07:44:49AM -0400, Miaohe Lin wrote:
>> Cache the swap_node() in a local variable to avoid possible multiple 
>> call to swap_node(), though compiler may do this for us.
>
>Why don't you find out?  Compare the assembly before and after, see what the compiler did.

In fact, I don't care if the compiler can really do this for us. I think it's better to do this explicity. I think this can improve the readability.
Thanks.






[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