On Mon, Jun 07, 2021 at 12:23:25PM +0200, Oscar Salvador wrote: > I can see arguments for both riping it out and doing it right (but none for > the way it is right now). > For riping it out, one could say that those races might not be fatal, > as usually the pfn you're working with (the one you want to check falls > within a certain range) you know is valid, so the worst can happen is > you get false positives/negatives and that might or might not be detected > further down. How bad are false positive/negatives I guess it depends on the > situation, but we already do that right now. > The zone_spans_pfn() from page_outside_zone_boundaries() is the only one using > locking right now, so well, if we survided this long without locks in other places > using zone_spans_pfn() makes one wonder if it is that bad. Givne that a) all current users of bad_range() are coming from VM_BUG_ON* callers b) we only care when removing memory as the page would not lie in the zone anymore. But for that to happen the whole offline_pages() operation needs to succeed. bad_range() is called from rmqueue(), __free_one_page() and expand(). If offline_pages() succeeds for the range our page lies on, we would not be doing those operations on that page anyway? So, I cannot find any strong reason to keep the seqlock (maybe in the future we need to re-add it because some usecase). Any objection on removing it? -- Oscar Salvador SUSE L3