From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8A2DC4708F for ; Tue, 1 Jun 2021 10:33:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6D3CA610C9 for ; Tue, 1 Jun 2021 10:33:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D3CA610C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E1D836B00B3; Tue, 1 Jun 2021 06:33:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DCDEB6B00B4; Tue, 1 Jun 2021 06:33:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C47136B00B5; Tue, 1 Jun 2021 06:33:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0179.hostedemail.com [216.40.44.179]) by kanga.kvack.org (Postfix) with ESMTP id 92E2D6B00B3 for ; Tue, 1 Jun 2021 06:33:47 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2A015A764 for ; Tue, 1 Jun 2021 10:33:47 +0000 (UTC) X-FDA: 78204794094.20.49F15E9 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf06.hostedemail.com (Postfix) with ESMTP id D3A53C00CBEE for ; Tue, 1 Jun 2021 10:33:34 +0000 (UTC) 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 C22781FD2D; Tue, 1 Jun 2021 10:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622543625; 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=VCS921ApL9LSFwrtHBUcyFVnLRi2XXAUivZ2aaWFSGs=; b=Tnc5SEPLQ/1zAFkGh34oI2iHhRh4Q2//2eaGnvMBQ2HRlVLnE8/A94f2jyP8ITXlN19gp1 +21PsMYvprqq4XKIUKQj20+ePF8t+JcljHgaqFJidDU2/FVkvgK9Y1dx5p9OxQuKEZxvVj MbLpxpGFQNE0kaMUDtUxo3X9T/SXu+Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622543625; 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=VCS921ApL9LSFwrtHBUcyFVnLRi2XXAUivZ2aaWFSGs=; b=j7jPzd4FVhOqJfzyqba8w/fdtwXvlhi9TrNZkDTXimNwP0VI/AFXh/ykOIeXPbahAf7aaF JxsLT7tz0P/hkQDQ== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 3412D118DD; Tue, 1 Jun 2021 10:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622543625; 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=VCS921ApL9LSFwrtHBUcyFVnLRi2XXAUivZ2aaWFSGs=; b=Tnc5SEPLQ/1zAFkGh34oI2iHhRh4Q2//2eaGnvMBQ2HRlVLnE8/A94f2jyP8ITXlN19gp1 +21PsMYvprqq4XKIUKQj20+ePF8t+JcljHgaqFJidDU2/FVkvgK9Y1dx5p9OxQuKEZxvVj MbLpxpGFQNE0kaMUDtUxo3X9T/SXu+Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622543625; 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=VCS921ApL9LSFwrtHBUcyFVnLRi2XXAUivZ2aaWFSGs=; b=j7jPzd4FVhOqJfzyqba8w/fdtwXvlhi9TrNZkDTXimNwP0VI/AFXh/ykOIeXPbahAf7aaF JxsLT7tz0P/hkQDQ== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id LchcCQkNtmAGEwAALh3uQQ (envelope-from ); Tue, 01 Jun 2021 10:33:45 +0000 Date: Tue, 1 Jun 2021 12:33:43 +0200 From: Oscar Salvador To: Michal Hocko Cc: David Hildenbrand , Anshuman Khandual , Andrew Morton , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm,memory_hotplug: Drop unneeded locking Message-ID: <20210601103334.GA5927@linux> References: <20210531093958.15021-1-osalvador@suse.de> <679d311a-8ad4-bb53-18f0-11190a2bf1b5@arm.com> <20210601074737.GA30768@linux> <20210601081250.GA32364@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) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Tnc5SEPL; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=j7jPzd4F; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Tnc5SEPL; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=j7jPzd4F; spf=pass (imf06.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D3A53C00CBEE X-Stat-Signature: g6ykh1944sh5zyfk15gj7tyisqqesgfd X-HE-Tag: 1622543614-567648 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 01, 2021 at 11:47:13AM +0200, Michal Hocko wrote: > While you are touching this and want to drill all the way down then it > would be reasonable to drop pgdat resize locks as well. > It is only used in the early boot code and we have one executing thread > context per numa node during the deferred initialization. I haven't > checked all potential side effects the lock might have but it sounds > like there is quite some clean up potential over there. I am not sure about that. True is that deferred_init_memmap() gets executed on numa-thread so it's not a problem for itself, but we also have deferred_grow_zone(). It might be that while deferred_init_memmap() is running, we also have calls to deferred_grow_zone() for the same node and that would cause some trouble wrt. first_deferred_pfn. I need to double check it, but IIRC, that is the case. -- Oscar Salvador SUSE L3