lkml.org 
[lkml]   [2022]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mm/khugepaged: add tracepoint to collapse_file()
On Mon, Oct 24, 2022 at 01:17:06PM -0700, Andrew Morton wrote:
> On Mon, 24 Oct 2022 23:05:58 +0530 Gautam Menghani <gautammenghani201@gmail.com> wrote:
>
> > In the file mm/khugepaged.c, a TODO in the function collapse_file() asks
> > to add tracepoints. Add the tracepoint named "mm_khugepaged_collapse_file".
>
> This isn't a very satisfying explanation for changing the kernel. Maybe
> the comment is stale are this tracepoint is unneeded.
>
> Please explain afresh how this addition benefits kernel users?
>
The function collapse_file() is called by the function hpage_collapse_scan_file().
Without a tracepoint in collapse_file(), we won't know if it was called or not and as a result,
we also won't know if it returned successfully or not. Also, as Zach mentioned earlier [1]:

there are a few scan result codes that overlap between hpage_collapse_scan_file() and those
possibly returned in collapse_file() such that, if we only have the one tracepoint in
hpage_collapse_scan_file(), it could be ambiguous what callsite the error path stemmed from.

[1]:https://lore.kernel.org/lkml/CAAa6QmSKtj6T2dW1tkg5_HVj2+rXj5inOLdEzr0MkJzQxxcPXQ@mail.gmail.com/

Please do let me know if a v3 is needed.

Thanks,
Gautam

\
 
 \ /
  Last update: 2022-10-25 07:08    [W:0.992 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site