lkml.org 
[lkml]   [2023]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 2/2] mm: compaction: Limit the value of interface compact_memory
On Wed, Mar 08, 2023 at 10:54:31PM +0100, Vlastimil Babka wrote:
> On 3/8/23 20:57, Luis Chamberlain wrote:
> > On Wed, Mar 08, 2023 at 11:23:45AM +0100, Vlastimil Babka wrote:
> >> > {
> >> > - if (write)
> >> > + int ret;
> >> > +
> >> > + ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
> >> > + if (ret)
> >> > + return ret;
> >> > + if (write) {
> >> > + pr_info("compact_nodes start\n");
> >> > compact_nodes();
> >> > + pr_info("compact_nodes end\n");
> >>
> >> I'm not sure we want to start spamming the dmesg. This would make sense
> >> if we wanted to deprecate the sysctl and start hunting for remaining
> >> callers to be fixed. Otherwise ftrace can be used to capture e.g. the time.
> >
> > Without that print, I don't think a custom proc handler is needed too,
> > right? So what would simplify the code.
>
> But we'd still call compact_nodes(), so that's not possible without a custom
> handler, no?

Ah right. It does beg the question if that form is common, so to define one.
But that's just extra work not needed now.

Luis

\
 
 \ /
  Last update: 2023-03-27 00:50    [W:0.057 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site