Re: [patch] mm, writeback: prevent race when calculating dirty limits

2014-07-17 Thread Michal Hocko
On Wed 16-07-14 17:36:49, David Rientjes wrote: > Setting vm_dirty_bytes and dirty_background_bytes is not protected by any > serialization. > > Therefore, it's possible for either variable to change value after the > test in global_dirty_limits() to determine whether available_memory needs > t

Re: [patch] mm, writeback: prevent race when calculating dirty limits

2014-07-16 Thread Johannes Weiner
On Wed, Jul 16, 2014 at 05:36:49PM -0700, David Rientjes wrote: > Setting vm_dirty_bytes and dirty_background_bytes is not protected by any > serialization. > > Therefore, it's possible for either variable to change value after the > test in global_dirty_limits() to determine whether available_m

[patch] mm, writeback: prevent race when calculating dirty limits

2014-07-16 Thread David Rientjes
Setting vm_dirty_bytes and dirty_background_bytes is not protected by any serialization. Therefore, it's possible for either variable to change value after the test in global_dirty_limits() to determine whether available_memory needs to be initialized or not. Always ensure that available_memor