Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4516045pxj; Tue, 8 Jun 2021 16:42:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU48IEZxPB5c2JvyilXsbj7270bLY1soYG5zUP/siRtTH6dxrCQbGh918swJyuP3y2Va0E X-Received: by 2002:a05:6402:158e:: with SMTP id c14mr27977516edv.128.1623195722018; Tue, 08 Jun 2021 16:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623195722; cv=none; d=google.com; s=arc-20160816; b=ZeWvma8f2K/UZWkqrYNNJTvPe7XNv6MQKnxw3UWI57BCoPzCspaTYEcuy2chrJZAJP BENqCONua/gZTLgRrwFeJOV0xpKbxk8/UpEDhA8R4vgkYtP9HfHkoCCyL1zLo2uZZufY gCmLueGA/hRXj26TQliNp4Fj/cmu6uzFXhrFI+jGeDiXl2gSJBio8ucIHo8d0H9UHpWq fL3N+D9j1PHBq3vFSCQflv2m7ht4sqeVMylYIZy/AuDhx/8+3zPm1hqVji3PvSmjrp3+ BkficgmKG+FuleFxYU0dgTiHOWJu/q3Bu+U/r45mlTIz+hfTVdfCJ5+TH7DS6qIr+xsL Z6YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=JRj2FQZ7QVfqBjtUOD4OpmT+xgtTDURi7+2WAKgq0eU=; b=zVP3MAt2lSSkp5qSswpUVhuQkFr7Oi43LAYPXzsi5KDTYmbDXYqGQyYPCyhgKwjeV7 cGd0dOAijYn8OiX8yiNBLTfXhlqhlklHY3csjThigRxk8DppYiwY3N5UHO7l8bQcNw7M Prucn7QAdYZyIPiuUTxm8jagiSxYJrt3xGBA+GiJeU7qppotrqqZqWxdE9InJttlCDIA HNgfhzIqBO6X/r3efRW1x+8b+Kous4Ct0dILkIbAortl4GP7oSdfLj8BOFXoDIB4I+gM XXikovVVsMBgpn2m6gn0qBnjoFFtQwNRe+0ymt/oRkmXX/6q5JM5vqHO4pxVJQsstYrP Y6Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=E3ZlrR8i; dkim=neutral (no key) header.i=@suse.de header.b="/iik28C4"; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=E3ZlrR8i; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/iik28C4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si1029200edq.47.2021.06.08.16.41.38; Tue, 08 Jun 2021 16:42:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=E3ZlrR8i; dkim=neutral (no key) header.i=@suse.de header.b="/iik28C4"; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=E3ZlrR8i; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/iik28C4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbhFHKoX (ORCPT + 99 others); Tue, 8 Jun 2021 06:44:23 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:34852 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231184AbhFHKoX (ORCPT ); Tue, 8 Jun 2021 06:44:23 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A50581FD33; Tue, 8 Jun 2021 10:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623148949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JRj2FQZ7QVfqBjtUOD4OpmT+xgtTDURi7+2WAKgq0eU=; b=E3ZlrR8iQDx2JYcCOrXRWa75EIdWTDnDbeBIHUaFAHt52VnLDc1z8FYgqUsIXjaHR7pLWR MYUYUXgaBEKK567SYoQdfhdylctmO0nO0yQgJhZ1/JfU7/Wd34d9t6hDSIY5r5dgYG9NW4 T9ivPfvLQPNRUnSaFlNNS817rLI/mFY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623148949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JRj2FQZ7QVfqBjtUOD4OpmT+xgtTDURi7+2WAKgq0eU=; b=/iik28C4PXYiFZJpgFdM0e+0XDe3EVfPC4qsUXrgJcTzvN5Lh27kO+aMgfk4NsbLw/8q1y KJDmHvPSDgEqx8DA== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 20101118DD; Tue, 8 Jun 2021 10:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623148949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JRj2FQZ7QVfqBjtUOD4OpmT+xgtTDURi7+2WAKgq0eU=; b=E3ZlrR8iQDx2JYcCOrXRWa75EIdWTDnDbeBIHUaFAHt52VnLDc1z8FYgqUsIXjaHR7pLWR MYUYUXgaBEKK567SYoQdfhdylctmO0nO0yQgJhZ1/JfU7/Wd34d9t6hDSIY5r5dgYG9NW4 T9ivPfvLQPNRUnSaFlNNS817rLI/mFY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623148949; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JRj2FQZ7QVfqBjtUOD4OpmT+xgtTDURi7+2WAKgq0eU=; b=/iik28C4PXYiFZJpgFdM0e+0XDe3EVfPC4qsUXrgJcTzvN5Lh27kO+aMgfk4NsbLw/8q1y KJDmHvPSDgEqx8DA== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id KEKGBJVJv2BiCQAALh3uQQ (envelope-from ); Tue, 08 Jun 2021 10:42:29 +0000 Date: Tue, 8 Jun 2021 12:42:27 +0200 From: Oscar Salvador To: David Hildenbrand Cc: Michal Hocko , Andrew Morton , Dave Hansen , Anshuman Khandual , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] mm,page_alloc: Use {get,put}_online_mems() to get stable zone's values Message-ID: <20210608104227.GB22894@linux> References: <20210602091457.17772-1-osalvador@suse.de> <20210602091457.17772-2-osalvador@suse.de> <39473305-6e91-262d-bcc2-76b745a5b14a@redhat.com> <20210604074140.GA25063@linux> <20210607075147.GA10554@linux> <85984701-55ae-dfa5-2a8d-f637051b612d@redhat.com> <20210607102318.GA12683@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210607102318.GA12683@linux> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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