memcg: use helper macro FLUSH_TIME

Message ID 20230603072116.1101690-1-linmiaohe@huawei.com
State New
Headers
Series memcg: use helper macro FLUSH_TIME |

Commit Message

Miaohe Lin June 3, 2023, 7:21 a.m. UTC
  Use helper macro FLUSH_TIME to indicate the flush time to improve the
readability a bit. No functional change intended.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Shakeel Butt June 3, 2023, 7:36 a.m. UTC | #1
On Sat, Jun 3, 2023 at 12:21 AM Miaohe Lin <linmiaohe@huawei.com> wrote:
>
> Use helper macro FLUSH_TIME to indicate the flush time to improve the
> readability a bit. No functional change intended.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: Shakeel Butt <shakeelb@google.com>
  
Muchun Song June 3, 2023, 11:13 a.m. UTC | #2
> On Jun 3, 2023, at 15:21, Miaohe Lin <linmiaohe@huawei.com> wrote:
> 
> Use helper macro FLUSH_TIME to indicate the flush time to improve the
> readability a bit. No functional change intended.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Muchun Song <songmuchun@bytedance.com>

Thanks
  
David Hildenbrand June 5, 2023, 11:32 a.m. UTC | #3
On 03.06.23 09:21, Miaohe Lin wrote:
> Use helper macro FLUSH_TIME to indicate the flush time to improve the
> readability a bit. No functional change intended.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>   mm/memcontrol.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index d8569594239c..f204c9f2e69c 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5397,7 +5397,7 @@ static int mem_cgroup_css_online(struct cgroup_subsys_state *css)
>   
>   	if (unlikely(mem_cgroup_is_root(memcg)))
>   		queue_delayed_work(system_unbound_wq, &stats_flush_dwork,
> -				   2UL*HZ);
> +				   FLUSH_TIME);
>   	lru_gen_online_memcg(memcg);
>   	return 0;
>   offline_kmem:

Reviewed-by: David Hildenbrand <david@redhat.com>
  
Roman Gushchin June 6, 2023, 12:38 a.m. UTC | #4
On Sat, Jun 03, 2023 at 03:21:16PM +0800, Miaohe Lin wrote:
> Use helper macro FLUSH_TIME to indicate the flush time to improve the
> readability a bit. No functional change intended.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: Roman Gushchin <roman.gushchin@linux.dev>

Thanks!
  

Patch

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d8569594239c..f204c9f2e69c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5397,7 +5397,7 @@  static int mem_cgroup_css_online(struct cgroup_subsys_state *css)
 
 	if (unlikely(mem_cgroup_is_root(memcg)))
 		queue_delayed_work(system_unbound_wq, &stats_flush_dwork,
-				   2UL*HZ);
+				   FLUSH_TIME);
 	lru_gen_online_memcg(memcg);
 	return 0;
 offline_kmem: