lkml.org 
[lkml]   [2023]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v1 7/9] workingset: memcg: sleep when flushing stats in workingset_refault()
On Tue, Mar 28, 2023 at 06:16:36AM +0000, Yosry Ahmed wrote:
> @@ -406,6 +406,8 @@ void workingset_refault(struct folio *folio, void *shadow)
> unpack_shadow(shadow, &memcgid, &pgdat, &eviction, &workingset);
> eviction <<= bucket_order;
>
> + /* Flush stats (and potentially sleep) before holding RCU read lock */
> + mem_cgroup_flush_stats_ratelimited();
> rcu_read_lock();

Minor nit, but please keep the lock section visually separated by an
empty line between the flush and the rcu lock.

Other than that,

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

\
 
 \ /
  Last update: 2023-03-28 20:44    [W:0.229 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site