On Wed, Jan 8, 2025 at 7:50 AM Nhat Pham <nphamcs@xxxxxxxxx> wrote: > > On Wed, Jan 8, 2025 at 10:36 PM Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote: > > > > > > Oh, I was not talking about my proposed diff, but the existing logic > > that allocates the requests and buffers in the hotplug callbacks > > instead of just using alloc_percpu() to allocate them once for each > > possible CPU. I was wondering if there are actual setups where this > > matters and a significant amount of memory is being saved. Otherwise > > we should simplify things and just rip out the hotplug callbacks. > > My vote is for ripping the hotplug callbacks (eventually) :) In > addition to the discrepancy in the number of possible and online CPUs, > we also need a relatively smaller memory size for the discrepancy to > matter, no? Systems with hundreds of CPUs (hopefully) should have > hundreds of GBs worth of memory available (if not more). > > Anyhow, we can just go with the diff you sent for now (and for past > kernels). Seems simple enough, and wouldn't get in the way of the > eventual hotplug logic removal (if you decide to pursue it). Yeah I sent that out just now: https://lore.kernel.org/lkml/20250108161529.3193825-1-yosryahmed@xxxxxxxxxx/ I will look into sending an RFC to rip out the hotplug callbacks later.