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=-5.8 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 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 A695CC47080 for ; Tue, 1 Jun 2021 09:47:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 10B66611CA for ; Tue, 1 Jun 2021 09:47:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10B66611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8F9FC6B00AA; Tue, 1 Jun 2021 05:47:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AA1B6B00AC; Tue, 1 Jun 2021 05:47:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74AEF6B00AD; Tue, 1 Jun 2021 05:47:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id 43F766B00AA for ; Tue, 1 Jun 2021 05:47:17 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DB768180AD807 for ; Tue, 1 Jun 2021 09:47:16 +0000 (UTC) X-FDA: 78204676872.01.3AC2ACE Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf29.hostedemail.com (Postfix) with ESMTP id 024AD375 for ; Tue, 1 Jun 2021 09:47:00 +0000 (UTC) Received: from relay2.suse.de (unknown [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A3A4121928; Tue, 1 Jun 2021 09:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1622540834; 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=9G3Kpyx+CwhO/99NFfmbRZHrvD5QiFT32bQzKFAn7/Q=; b=GvuEo/HOq76opQ8mc4wpz1Gm/ff1RvdFOyFKZY6AuVdL3EJuyOJmt4yLa4EJeL3USQGsnx 9CyqtlrdlltWBFJoKbOLuFcXrX6KszlWbDapfZRV9Zmi94n3TVjx3S9qNWIuyVQ5OZXcgi XMpuqWbv+kiIBs+1XcmqxwPrRhkw48s= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 53E7FA3B84; Tue, 1 Jun 2021 09:47:14 +0000 (UTC) Date: Tue, 1 Jun 2021 11:47:13 +0200 From: Michal Hocko To: Oscar Salvador 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: 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: <20210601081250.GA32364@linux> X-Rspamd-Queue-Id: 024AD375 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="GvuEo/HO"; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf29.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Rspamd-Server: rspam03 X-Stat-Signature: ps1nxs83hp6aqgdawiojqfcqfh6hft1f X-HE-Tag: 1622540820-106450 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 01-06-21 10:12:54, Oscar Salvador wrote: > On Tue, Jun 01, 2021 at 10:02:54AM +0200, David Hildenbrand wrote: > > If there is no writer anymore, why do we have to protect readers? > > Yeah, you are right. > Let me prepare a v2 as this is getting too sloppy. 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. -- Michal Hocko SUSE Labs