Re: [PATCH] mm/khugepaged: Remove unnecessary try_to_freeze()

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

 



On Mon, Dec 18, 2023 at 10:34:51AM -0800, Andrew Morton wrote:
> On Sat, 16 Dec 2023 19:43:41 +0800 Kevin Hao <haokexin@xxxxxxxxx> wrote:
> 
> > A freezable kernel thread can enter frozen state during freezing by
> > either calling try_to_freeze() or using wait_event_freezable() and its
> > variants. However, there is no need to use both methods simultaneously.
> > The freezable wait variants have been used in khugepaged_wait_work()
> > and khugepaged_alloc_sleep(), so remove this unnecessary
> > try_to_freeze().
> > 
> 
> Looks OK to me, but this will increase freezing latencies.  How
> significant is this?

I don't think this would cause observable freezing latencies, and most of time,
we won't enter the freezing state, it is worthwhile to reduce the overhead of
a function call.

On my Intel Alder Lake board (24 CPUs, 32G memory) with transparent hugepage enabled.

Before this patch:
  Freezing user space processes
  Freezing user space processes completed (elapsed 0.000 seconds)
  OOM killer disabled.
  Freezing remaining freezable tasks
  Freezing remaining freezable tasks completed (elapsed 0.001 seconds)

After this patch:
  Freezing user space processes
  Freezing user space processes completed (elapsed 0.000 seconds)
  OOM killer disabled.
  Freezing remaining freezable tasks
  Freezing remaining freezable tasks completed (elapsed 0.001 seconds)

> 
> Also, we already have a patch from you with this same title.  Please
> try to use different titles for different patches.

Sure, I will tweak it in v2.

Thanks,
Kevin

Attachment: signature.asc
Description: PGP signature


[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