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=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,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 7E9C2C4708F for ; Tue, 1 Jun 2021 08:03:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 278A661378 for ; Tue, 1 Jun 2021 08:03:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 278A661378 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BBA168D0006; Tue, 1 Jun 2021 04:02:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B909D8D0002; Tue, 1 Jun 2021 04:02:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A328A8D0006; Tue, 1 Jun 2021 04:02:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0108.hostedemail.com [216.40.44.108]) by kanga.kvack.org (Postfix) with ESMTP id 725898D0002 for ; Tue, 1 Jun 2021 04:02:59 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1108F181AC9CC for ; Tue, 1 Jun 2021 08:02:59 +0000 (UTC) X-FDA: 78204414078.07.2D50D1D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id 2A3E6548 for ; Tue, 1 Jun 2021 08:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622534578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nC6vJCqg2xcsbPsrocgrlXG+kt6WskzJ0DDl/gOMrrs=; b=eJQrVCGXgHEartomrT/dvO+F7BWHMZm+N1o0JvtJwjYMg8kouKCVCt77N1qDp7OGOS1l8n vY+G+h7nuUaG9L7PYKc1FWS/Nf1gUylXiv5Z0mBd8c5Ybzyp/8x08JCjhlSOzdktf1KV7l TZyx3XhpwmVqmOgIaZVSBCmEwh4yOF0= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-412-yjszXPyUOVuXt7ASivLfIA-1; Tue, 01 Jun 2021 04:02:56 -0400 X-MC-Unique: yjszXPyUOVuXt7ASivLfIA-1 Received: by mail-wr1-f69.google.com with SMTP id h104-20020adf90710000b029010de8455a3aso4536053wrh.12 for ; Tue, 01 Jun 2021 01:02:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=nC6vJCqg2xcsbPsrocgrlXG+kt6WskzJ0DDl/gOMrrs=; b=TTqJImZDERbwqf8shctXKm4vHPkHRkJ1QVQCMUuYZ1t+LVUajwmwmWw3fmYmxeIOfs n6W6QIHXtaFBqJHnCa6dG5DY1KbAWjjdRnM83cgsLGrKBtLY5F3C9Lr5tKwYfA/sSHGy uHVFGlx7RqNq3xBv2ny3vbn1fVdeGJRR+KHrYFtXzcU3TYTu+GNhFqCzg2Y5D8henRli Us7e8NK5BB1zoRJnd8XbM8D4zbMdvBzK5PkwPQnBdKlqq5o6LZpfZCxFo1E6cM3cThHm CkMx8czXAL2K/R3ihiN8pBl4z8cGXFt2OtYTgUnrNJS+Vi5kI5f5W4ihHgEARtySu0eh UF2Q== X-Gm-Message-State: AOAM533pCPW0819AXmm0DvUYC+01EzEhN0/Hg6Bn7fUdtvU7afBDRGJ4 6Tpb65QUIjMupp4yhCsIagWHA6bxZOqja86FB6AeZhRhAqmWdIcqLg7yTVo3pjYnpDXhEZvNOTf MBx+U74q8Gqc= X-Received: by 2002:a1c:4b13:: with SMTP id y19mr3306522wma.102.1622534574992; Tue, 01 Jun 2021 01:02:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMMEa9JGVFtvJcqXTvaDxvwVIh9UeQ7EkpoSGCk3UjM8vH/hWyW39dr7lxbyqGDPq4wImaWQ== X-Received: by 2002:a1c:4b13:: with SMTP id y19mr3306503wma.102.1622534574837; Tue, 01 Jun 2021 01:02:54 -0700 (PDT) Received: from [192.168.3.132] (p5b0c69ce.dip0.t-ipconnect.de. [91.12.105.206]) by smtp.gmail.com with ESMTPSA id w13sm2611037wrc.31.2021.06.01.01.02.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 01:02:54 -0700 (PDT) Subject: Re: [PATCH] mm,memory_hotplug: Drop unneeded locking To: Oscar Salvador , Anshuman Khandual Cc: Andrew Morton , Michal Hocko , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210531093958.15021-1-osalvador@suse.de> <679d311a-8ad4-bb53-18f0-11190a2bf1b5@arm.com> <20210601074737.GA30768@linux> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Tue, 1 Jun 2021 10:02:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210601074737.GA30768@linux> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 2A3E6548 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=eJQrVCGX; spf=none (imf04.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam04 X-Stat-Signature: 863bhd9rbkbboegikwztbqgh1s1ag9jf X-HE-Tag: 1622534572-312474 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 01.06.21 09:47, Oscar Salvador wrote: > 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); > -} If there is no writer anymore, why do we have to protect readers? -- Thanks, David / dhildenb