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.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 9F339C11F68 for ; Fri, 2 Jul 2021 17:57:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 30A0461402 for ; Fri, 2 Jul 2021 17:57:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30A0461402 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 900736B0011; Fri, 2 Jul 2021 13:57:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D7286B0036; Fri, 2 Jul 2021 13:57:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 751866B005D; Fri, 2 Jul 2021 13:57:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 5255C6B0011 for ; Fri, 2 Jul 2021 13:57:18 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 07E95180AC16A for ; Fri, 2 Jul 2021 17:57:18 +0000 (UTC) X-FDA: 78318404556.14.D8EFB7D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf13.hostedemail.com (Postfix) with ESMTP id A51CC100023D for ; Fri, 2 Jul 2021 17:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625248637; 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=VyOX1XyKGar6HVpF2pvAGlRx3oFJwVrE2GV/F03AcqM=; b=JYRwuV9XYAPOheoEuP9bfoZqovcuWNLSj/WFIPsAMF57I2MMD4JPgX8NqO7mgHKSY/eX8V H6c7nh8L5poWGsnQHjIK7E6yJ2VlgiO+XNJcL7Mg1p7lqOE874uVyL5K7BgXSTfj1RME6i ZMtWaFy3A+g+2pu8Rrg+aLtHSHswlT8= 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-17-UGb-PoEwN8mqF7lb_zGgyQ-1; Fri, 02 Jul 2021 13:57:16 -0400 X-MC-Unique: UGb-PoEwN8mqF7lb_zGgyQ-1 Received: by mail-wr1-f69.google.com with SMTP id y5-20020adfe6c50000b02901258bf1d760so4164945wrm.14 for ; Fri, 02 Jul 2021 10:57:16 -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=VyOX1XyKGar6HVpF2pvAGlRx3oFJwVrE2GV/F03AcqM=; b=YyGirCtB3F7yLCYtLPKw5NQ0VyaL4nHXZRBXVBFpMgnfA7UfnuEpJ9q/sRda/if0fJ lGC+QJlCKKChSu1KQ5KUY+/bB0BdUiiHsPW6+vVTDbjVdB+Z2qlU6dO/4y/ctqz2By5J X/im4gRj4gMewzvVZOhOUNt1gwIo5aIMhI7vNynEtWi0phr2UZHhNZuUBLs/46Nt6efw I+RMX9LsdxYFK89ZA4RT0xXeYSNsGYqjbZzgH/9hlyg304GUpx+ilDRuzmcN8Hmkiz5H TJruTqq6zYECyrKlLPhuhWp/+19xVuSTyLsfufGitU9hdar22tifuIAl/h9z3kbeCVRN eu5Q== X-Gm-Message-State: AOAM531Cwn3H4L6fbuWv9ZGFF4pQjLR0OwX4W7/4uwaCS8nq9G9ocZW9 eigXVOGl6MP5vDoiAlDp0c8HdOfe1BjjWPF8Y/rOnGUF6FvNn3nwEpyFADWvMR4P6LIPcc1vvvJ NxLK7p5P5tuM= X-Received: by 2002:a05:6000:1889:: with SMTP id a9mr940497wri.141.1625248635093; Fri, 02 Jul 2021 10:57:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS7TybUgpLaYy3CrmfiQ5mLI6fYGEEC1YvL1sgjNReZ72CrYZobJZEvr+Ipp6hPyBsq+eZNQ== X-Received: by 2002:a05:6000:1889:: with SMTP id a9mr940482wri.141.1625248634907; Fri, 02 Jul 2021 10:57:14 -0700 (PDT) Received: from [192.168.3.132] (p4ff23afb.dip0.t-ipconnect.de. [79.242.58.251]) by smtp.gmail.com with ESMTPSA id n20sm3552874wmk.12.2021.07.02.10.57.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jul 2021 10:57:14 -0700 (PDT) Subject: Re: [PATCH 3/3] mm: sparse: remove __section_nr() function To: Michal Hocko , Ohhoon Kwon Cc: akpm@linux-foundation.org, bhe@redhat.com, rppt@linux.ibm.com, ohkwon1043@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210702094132.6276-1-ohoono.kwon@samsung.com> <20210702094132.6276-4-ohoono.kwon@samsung.com> From: David Hildenbrand Organization: Red Hat Message-ID: <747f311e-0239-0f4a-2561-11e2a34d8ce1@redhat.com> Date: Fri, 2 Jul 2021 19:57:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: 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 Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=JYRwuV9X; spf=none (imf13.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A51CC100023D X-Stat-Signature: cthh9zwe1ffdqrefxw6pb6dadqjx7c34 X-HE-Tag: 1625248637-912606 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 02.07.21 14:18, Michal Hocko wrote: > On Fri 02-07-21 18:41:32, Ohhoon Kwon wrote: >> __section_nr() was used to convert struct mem_section * to section_nr. >> >> With CONFIG_SPARSEMEM_EXTREME enabled, however, __section_nr() can be >> costly since it iterates all section roots to check if the given >> mem_section is in its range. >> >> On the other hand, __nr_to_section() which converts section_nr to >> mem_section can be done in O(1). >> >> The only users of __section_nr() was section_mark_present() and >> find_memory_block(). >> >> Since I changed both functions to use section_nr directly in the >> preceeding patches, let's remove __section_nr() which has no users. >> >> Signed-off-by: Ohhoon Kwon > > I would go with a much shorter changelog. The function is not used > anymore so it can be simply dropped. > Acked-by: Michal Hocko Agreed, also avoid the use of "I" in patches. Use something like "As the last users of __section_nr() are gone, let's remove now unused __section_nr()." Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb