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=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 8CA0CC2BA83 for ; Wed, 12 Feb 2020 09:40:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4CABB206ED for ; Wed, 12 Feb 2020 09:40:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LNii72C5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CABB206ED 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 D41986B0414; Wed, 12 Feb 2020 04:40:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CF3466B0415; Wed, 12 Feb 2020 04:40:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB9006B0416; Wed, 12 Feb 2020 04:40:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id A2A6B6B0414 for ; Wed, 12 Feb 2020 04:40:06 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 52204181AC550 for ; Wed, 12 Feb 2020 09:40:06 +0000 (UTC) X-FDA: 76480978812.23.limit96_3afa5e9758c43 X-HE-Tag: limit96_3afa5e9758c43 X-Filterd-Recvd-Size: 5316 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Wed, 12 Feb 2020 09:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581500404; 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=xff2wdhMOqf9G8XaANnyzUjOiSv2zGktsBVAeYeJBtg=; b=LNii72C5Oy9SeAB8cq2qPL9BNevzKMh3tDN61E+NZHrz6QLqsURLvtJ7vNYsy09BnhUJgE 1yVVBLSnxHR7bU2s82RWI/N0A6DvyP8ubnz5JX8iwHpvmT86N7vGxUZD0VK57Pii/zfypn KFbIR+0vvCSuJro07DxXy0Z5uu9jxMw= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-211-f5j_CpjlOuif7-wDkoRjKg-1; Wed, 12 Feb 2020 04:40:00 -0500 Received: by mail-wm1-f72.google.com with SMTP id n17so499185wmk.1 for ; Wed, 12 Feb 2020 01:39:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=c83LcFNEPkF5bSyJ17QW8npolY+U6XnNUigsdS1CwDA=; b=NbH5t2+Me66Uq5GUKtC1Um94xylOQVVhR5cHuGEmLaFMDO4QQDveXT50oSGIA4JLuP KnGKn+hqWsRaxZJV8WAmqqlzkhui/RUi+syeCzhIHK0/tc3fjy3/ZPee/Tc/Gl0jy5nG WNGGpZtllOLbdgjJod53I2AkIAgLhJB4axRiSWvOFXBPwZUPYC3ayC+wghDYXrFqCOym 54r2wKO6Au3100w2be3nnumY1ARv0hZnnnYYS+qL+6uQELbCnrbosPE4fvXvK82d0Wqz LzfhFZ1IYXQKkBR9fzaKSS9CupeE7rR1GSekEQ0tnTdD6aUpkQBbUYNb3pMDRq63+wnv Whnw== X-Gm-Message-State: APjAAAXP6UgV+Tq+WuxuFB+GlKFHVhBUaVQ/uqZbYKsRg1ha7TU/zcWM LkkjfTyjr71LsUMPnVNdxAKyV1UdppnXpze5tMXjFDR9TguZifH0mNMnhFeKlD7sjdWufw6B2pq r5EbdZKjuOuk= X-Received: by 2002:a7b:cc81:: with SMTP id p1mr11434530wma.62.1581500398737; Wed, 12 Feb 2020 01:39:58 -0800 (PST) X-Google-Smtp-Source: APXvYqycGgOsxcsLpBqLe1JUUbLxeEn1YGzSgVehs1upbAUjMLYhLIYvtCmSvFnQyscOJ1cUULDMig== X-Received: by 2002:a7b:cc81:: with SMTP id p1mr11434495wma.62.1581500398455; Wed, 12 Feb 2020 01:39:58 -0800 (PST) Received: from ?IPv6:2a01:598:b900:81d7:5461:d59c:2c6b:6afa? ([2a01:598:b900:81d7:5461:d59c:2c6b:6afa]) by smtp.gmail.com with ESMTPSA id h18sm9160176wrv.78.2020.02.12.01.39.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Feb 2020 01:39:57 -0800 (PST) From: David Hildenbrand Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 3/7] mm/sparse.c: only use subsection map in VMEMMAP case Date: Wed, 12 Feb 2020 10:39:56 +0100 Message-Id: References: Cc: Baoquan He , Linux Kernel Mailing List , Linux MM , Andrew Morton , Wei Yang , David Hildenbrand In-Reply-To: To: Dan Williams X-Mailer: iPhone Mail (17D50) X-MC-Unique: f5j_CpjlOuif7-wDkoRjKg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: > Am 11.02.2020 um 21:15 schrieb Dan Williams : >=20 > =EF=BB=BFOn Sun, Feb 9, 2020 at 2:48 AM Baoquan He wrote= : >>=20 >> Currently, subsection map is used when SPARSEMEM is enabled, including >> VMEMMAP case and !VMEMMAP case. However, subsection hotplug is not >> supported at all in SPARSEMEM|!VMEMMAP case, subsection map is unnecessa= ry >> and misleading. Let's adjust code to only allow subsection map being >> used in SPARSEMEM|VMEMMAP case. >>=20 >> Signed-off-by: Baoquan He >> --- >> include/linux/mmzone.h | 2 + >> mm/sparse.c | 231 ++++++++++++++++++++++------------------- >> 2 files changed, 124 insertions(+), 109 deletions(-) >>=20 >> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h >> index 462f6873905a..fc0de3a9a51e 100644 >> --- a/include/linux/mmzone.h >> +++ b/include/linux/mmzone.h >> @@ -1185,7 +1185,9 @@ static inline unsigned long section_nr_to_pfn(unsi= gned long sec) >> #define SUBSECTION_ALIGN_DOWN(pfn) ((pfn) & PAGE_SUBSECTION_MASK) >>=20 >> struct mem_section_usage { >> +#ifdef CONFIG_SPARSEMEM_VMEMMAP >> DECLARE_BITMAP(subsection_map, SUBSECTIONS_PER_SECTION); >> +#endif >=20 > This was done deliberately so that the SPARSEMEM_VMEMMAP=3Dn case ran as > a subset of the SPARSEMEM_VMEMMAP=3Dy case. >=20 > The diffstat does not seem to agree that this is any clearer: >=20 > 124 insertions(+), 109 deletions(-) >=20 I don=E2=80=98t see a reason to work with subsections (+store them) if subs= ections are not supported. I do welcome this cleanup. Diffstats don=E2=80=98t tell the whole story.