On 2/3/21 12:10 PM, Bharata B Rao wrote:
On Wed, Jan 27, 2021 at 12:04:01PM +0100, Vlastimil Babka wrote:
quoted
Yes, but it's tricky to do the retuning safely, e.g. if freelist randomization
is enabled, see [1].
But as a quick fix for the regression, the heuristic idea could work reasonably
on all architectures?
- if num_present_cpus() is > 1, trust that it doesn't have the issue such as
arm64, and use it
- otherwise use nr_cpu_ids
Long-term we can attempt to do the retuning safe, or decide that number of cpus
shouldn't determine the order...
[1] https://lore.kernel.org/linux-mm/d7fb9425-9a62-c7b8-604d-5828d7e6b1da@suse.cz/ (local)
So what is preferrable here now? Above or other quick fix or reverting
the original commit?
I would try the above first. In case it doesn't work, revert. As the immediate
fix for the regression, that people can safely backport.
Anything more complex will take more time and would be more risky to backport.
Regards,
Bharata.