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