Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp247937pxy; Wed, 21 Apr 2021 01:56:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRbgfjUpKSxnnFKeQRhrmfO7AnixuVriA+sdgxrFZQHxklV/01HdgU5TM11eMwXZgqF/// X-Received: by 2002:aa7:9e9e:0:b029:257:b49:2800 with SMTP id p30-20020aa79e9e0000b02902570b492800mr29503534pfq.10.1618995365088; Wed, 21 Apr 2021 01:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618995365; cv=none; d=google.com; s=arc-20160816; b=h9qc8c5rTGLyVq/iU0aJNpbepN7+rqQAHb+KEjD2NwOgs+UsFT04Zm+yTw28f+efV7 GwNEh5dsq3NpVkx+Ho3iqeoDTHqnXeY296aGugpLre91pZ1DzqMzqJ4EYb3l/XPWFWmd FPR4HdepxhuY6vVvUnhhc+TYdZ21j72Esg60qx+FKqMZiN9UHErBdfx07hW63N8xNvJ/ j22OC8rsNE5CTJJEF1vYcQR+NhUIfaRige0aoUtBjc1VjSlLfupBA61awAxjPoIFOwbr Me9qmDOgDWCcWMSHxaX6DmjnIE0SXXv9Wl0CBRK0q2doDf2zf7vZ9QT32dBh5S+hb4A1 C6/w== 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; bh=/ez4WRODzgJOyx+zKUfyUbB++iTm/tHoVjYfDidL4u8=; b=YOEqVf9jGsBfBrd7oBfamAy8/usQaHON/byy4rw5qNr6bzZHusE5LlqNBWu4e9DT3U EA3PeGlkzPq9rOCUOrUt+6VkAbPZljIuu6rl0k4cIvrX9nN108j9ZpnNGr/GiyP6BPdv yP5QnZirrXm1s28fITIMs3brDxBuiWCD7NA0RzGjuMCJCljcNdAzpbbKqoB9un5WmBqM iaEQF/cMYFRhnou1m0hkoMgpI4OlSoqF3bCGDYUG68WcXJaWroYKrVY66eNL6wGq5bPl CWFJt+oDsxR98Vi2WZBn98ovoT7fJacKrh2yD1pWuo4ZNPkNPM7h6GgMlmkMzxryhoXC M8OA== ARC-Authentication-Results: i=1; mx.google.com; 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 f11si1882165plo.17.2021.04.21.01.55.53; Wed, 21 Apr 2021 01:56:05 -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; 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 S235513AbhDUIgC (ORCPT + 99 others); Wed, 21 Apr 2021 04:36:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:32956 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234407AbhDUIgC (ORCPT ); Wed, 21 Apr 2021 04:36:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 83531B143; Wed, 21 Apr 2021 08:35:28 +0000 (UTC) Date: Wed, 21 Apr 2021 10:35:26 +0200 From: Oscar Salvador To: Michal Hocko Cc: Andrew Morton , David Hildenbrand , Anshuman Khandual , Pavel Tatashin , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 3/8] mm,memory_hotplug: Factor out adjusting present pages into adjust_present_page_count() Message-ID: <20210421083525.GF22456@linux> References: <20210416112411.9826-1-osalvador@suse.de> <20210416112411.9826-4-osalvador@suse.de> <20210421080036.GC22456@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 10:31:30AM +0200, Michal Hocko wrote: > > Given that {offline,online}_pages() is serialized by the memory_hotplug lock, > > I would say that {node,zone}->{spanned,present}_pages is, at any time, stable? > > So, no need for the lock even without considering this patch? > > Yes. The resize lock is really only relevant to the parallel struct page > initialization during early boot. The hotplug usage seems just a left > over from the past or maybe it has never been really relevant in that > context. Ok, I will prepare a follow-up patch to remove the lock in such situations when this work goes in. -- Oscar Salvador SUSE L3