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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 AA2F4C4708F for ; Tue, 1 Jun 2021 07:47:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4587A613AB for ; Tue, 1 Jun 2021 07:47:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4587A613AB 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 7AC2E6B0070; Tue, 1 Jun 2021 03:47:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7350A6B0071; Tue, 1 Jun 2021 03:47:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 560658D0002; Tue, 1 Jun 2021 03:47:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id 1E76B6B0070 for ; Tue, 1 Jun 2021 03:47:47 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B91D799AC for ; Tue, 1 Jun 2021 07:47:46 +0000 (UTC) X-FDA: 78204375732.21.68CB428 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf07.hostedemail.com (Postfix) with ESMTP id C2503A000252 for ; Tue, 1 Jun 2021 07:47:33 +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 81B8B1FD2D; Tue, 1 Jun 2021 07:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622533664; 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=QKUWHbN2cryxRpWGCysEGcdBOB1MXEIxNS6COFYpH98=; b=GiJvMgTmkvfRlp0JIy3maL9IwPN+9pF2Lr86hIURcpPxMtX+4clQRo6N3XTEZWYh2y4JH4 OFs4d+KWKMpjh2AtKKWvK4Nd7KpiIk/s0FvK01pU0DAqhZpl560BfTV4GsAwlH0Wyazu7c 4BQPsb6iu56sq+xymqtIAc11zHn/0/Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622533664; 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=QKUWHbN2cryxRpWGCysEGcdBOB1MXEIxNS6COFYpH98=; b=C219fcOmkjZbIRb7kVzo5YcF8jRCd5D0bF+RuYRK8PGqYUxXUFGa4G/oT7om9rZbMZ70Lo pxxSZjr7UKg42MBw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id DB67D118DD; Tue, 1 Jun 2021 07:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622533664; 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=QKUWHbN2cryxRpWGCysEGcdBOB1MXEIxNS6COFYpH98=; b=GiJvMgTmkvfRlp0JIy3maL9IwPN+9pF2Lr86hIURcpPxMtX+4clQRo6N3XTEZWYh2y4JH4 OFs4d+KWKMpjh2AtKKWvK4Nd7KpiIk/s0FvK01pU0DAqhZpl560BfTV4GsAwlH0Wyazu7c 4BQPsb6iu56sq+xymqtIAc11zHn/0/Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622533664; 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=QKUWHbN2cryxRpWGCysEGcdBOB1MXEIxNS6COFYpH98=; b=C219fcOmkjZbIRb7kVzo5YcF8jRCd5D0bF+RuYRK8PGqYUxXUFGa4G/oT7om9rZbMZ70Lo pxxSZjr7UKg42MBw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id TPU+Mh/mtWC3MAAALh3uQQ (envelope-from ); Tue, 01 Jun 2021 07:47:43 +0000 Date: Tue, 1 Jun 2021 09:47:42 +0200 From: Oscar Salvador To: Anshuman Khandual Cc: Andrew Morton , David Hildenbrand , Michal Hocko , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm,memory_hotplug: Drop unneeded locking Message-ID: <20210601074737.GA30768@linux> References: <20210531093958.15021-1-osalvador@suse.de> <679d311a-8ad4-bb53-18f0-11190a2bf1b5@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <679d311a-8ad4-bb53-18f0-11190a2bf1b5@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spamd-Result: default: False [-0.50 / 100.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2] Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GiJvMgTm; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=C219fcOm; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GiJvMgTm; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=C219fcOm; dmarc=none; spf=pass (imf07.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C2503A000252 X-Stat-Signature: 7bk66jin4cjg4wuxdftmpmku9f8i5tmm X-HE-Tag: 1622533653-226968 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 10:47:31AM +0530, Anshuman Khandual wrote: > Should also just drop zone_span_write[lock|unlock]() helpers as there > are no users left ? Yes, definitely. Andrew, can you squash this on top? Thanks: diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index a7fd2c3ccb77..27d8ba1d32cb 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -67,10 +67,6 @@ struct range mhp_get_pluggable_range(bool need_mapping); /* * Zone resizing functions - * - * Note: any attempt to resize a zone should has pgdat_resize_lock() - * zone_span_writelock() both held. This ensure the size of a zone - * can't be changed while pgdat_resize_lock() held. */ static inline unsigned zone_span_seqbegin(struct zone *zone) { @@ -80,14 +76,6 @@ static inline int zone_span_seqretry(struct zone *zone, unsigned iv) { return read_seqretry(&zone->span_seqlock, iv); } -static inline void zone_span_writelock(struct zone *zone) -{ - write_seqlock(&zone->span_seqlock); -} -static inline void zone_span_writeunlock(struct zone *zone) -{ - write_sequnlock(&zone->span_seqlock); -} static inline void zone_seqlock_init(struct zone *zone) { seqlock_init(&zone->span_seqlock); @@ -233,8 +221,6 @@ static inline int zone_span_seqretry(struct zone *zone, unsigned iv) { return 0; } -static inline void zone_span_writelock(struct zone *zone) {} -static inline void zone_span_writeunlock(struct zone *zone) {} static inline void zone_seqlock_init(struct zone *zone) {} static inline int try_online_node(int nid) -- Oscar Salvador SUSE L3