Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3330756pxj; Tue, 1 Jun 2021 02:49:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoY/5L9c8KKcyBWl23KWqsYWUTNM2/ywTCQNbu0RLQj+gkALckDtZBInP7KqOdkQR4Zkt3 X-Received: by 2002:a02:9442:: with SMTP id a60mr12519935jai.105.1622540983631; Tue, 01 Jun 2021 02:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622540983; cv=none; d=google.com; s=arc-20160816; b=j/WyF5MhyaHWDp0nBBG8g5O+WCVH68vNvoNT/mG4QCKS4dTtOqrR1q6ePOcQiyWfsN xjEHWD1p6PiNSeCORmHgaZfUuOLmpOoXtvi7y6j7yOjFsZdscqzgFCQPWnJafov7kKsf 2sVhA6BRfaoPSpUx82DcIyQbfdCvqWPgf6VE0TrsaznFCGuFgRMffqkrdqQbG2zfdSvf 6bArZA2kkVEx+5TeE99gJiDE1WIt14TeJ28HzGQpdA+LRjH1ap5TRffEQvjOHZve2Daq bqWmpmvlgFoCgf1BArdSWqSuCf1Rec7MTGVYZ8sPjIIz7PE9RpNI4cYK66dc6gJA7AKu iJBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9G3Kpyx+CwhO/99NFfmbRZHrvD5QiFT32bQzKFAn7/Q=; b=j0/Lwu128LLyMdpum6tmKeaya49qSG8aPiSbMsEfKtl3Fnhhj794SGIA9+pT+Ilu84 xlgp99irNhRSgT+1b0WJsAhkGe2UFRJISP36A+05oNdhMIqdcGr+zvxvPJV+WMup3UCj lz+ExWErPiVZAeOSSFYrZrWe+5GBa9DVek2rI101s8HDTjOXUVDqvhwZlkC9D9ssi/2z 8uSkErVlAYiLPgZ1grF2GkQc9gH6XQskmBHTRigbDFgeUI+NYSyhBC0/wMV6RFspxCFB IkOk8ehVn1+sWLdrKYPf0iQ3nScVNa8mA0dqvlQPxNdlnZf3t/9+XU6OeXHfcLryLMVr yHMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="GvuEo/HO"; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si16638948iou.72.2021.06.01.02.49.26; Tue, 01 Jun 2021 02:49:43 -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.com header.s=susede1 header.b="GvuEo/HO"; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233360AbhFAJtA (ORCPT + 99 others); Tue, 1 Jun 2021 05:49:00 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:47094 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233160AbhFAJs4 (ORCPT ); Tue, 1 Jun 2021 05:48:56 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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