Re: [PATCH] mm/memcontrol: fix a data race in scan count

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

 




> On Feb 9, 2020, at 11:28 PM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> 
> I worry about the readability/maintainability of these things.  A naive
> reader who comes upon this code will wonder "why the heck is it using
> READ_ONCE?".  A possibly lengthy trawl through the git history will
> reveal the reason but that's rather unkind.  Wouldn't a simple
> 
>    /* modified under lru_lock, so use READ_ONCE */
> 
> improve the situation?

Sure. I just don’t remember there are many places in the existing code which put comments for READ_ONCE() and WRITE_ONCE(). For example, kernel/locking/osq_lock.c and kernel/rcu/srcutree.c, but I suppose every subsystem could be different.



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

  Powered by Linux