Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1790535ybp; Fri, 11 Oct 2019 21:29:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEnofVz1ERSJhezZ8MFIFlniXsx+xeQXwfaTmSUrOxytR1PsD01gQs1+eUuU8QSI+raoLj X-Received: by 2002:a17:906:5bcf:: with SMTP id w15mr17481011ejs.84.1570854563798; Fri, 11 Oct 2019 21:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570854563; cv=none; d=google.com; s=arc-20160816; b=mug/9P+Y8AdeWONY/PG2HVQJC17ylqa9V3pYoz///ZnfBNcLPxHzSzSBQ5E0vj+fhi 3VJNF8B4M0jrxSQivP8I2eZWKbVlO8k/LdFHK9zN/9wszBunRMZTB+sBc/ip/SYfZvNL XUtnz/aEFQu52sC+z1kNSyjJnFLcda6N3KCUWFHhCzxupSAiLMx7niR3Ql138/CDym7/ m3LLv+DSW8z5vSyHlsQmf7yjuIXatxejvfzRROH8+WiHdpgjZ1WRwTbGKrVYQUPA/zKn IKoRaL10Uz8wPeraB2Y0TBdfxbAxIes/rA+8XtmWdLLFOSLIno8I38w5unis27ChGWjs TvKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=u9wmT/Hdot8DTpUJdxXrIyO9KPNJrJCevfN1MDnU3f8=; b=l7fiiAe4vs2DjmaieTbQs37Z1uxoxZ2AauSOroUS/fhV1Q8LsAcxSuFx6bZKc5o4F4 PUhEJ0ps+lPu5MBIgh+os9aDNy8/4L9VRULVsJcdal/bimsHkZ/RQG6mK4MxYm7kOCqX dqrxXeC6kN6ytBD64JxFbjASXareGjKci2n9tn2vy+Rluui9/AD2wDvMQEDjV0uFu8BJ WGmirfP//qDxmJ0QDf8Jm6H6UrexwK2G3VHaRO4PY8DKqaxi0dzfoI1QQ3ypKBpJ6iDl I1/5rL2E7wW3TcfvnKyfromKHxvcZNiwf3fOucQ80Md0CK4WrEKX7qs6wg9E1Xwvcoiu HRPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=nYyD0Kjm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si6702293ejj.70.2019.10.11.21.28.59; Fri, 11 Oct 2019 21:29:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=nYyD0Kjm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728142AbfJLE0W (ORCPT + 99 others); Sat, 12 Oct 2019 00:26:22 -0400 Received: from conssluserg-03.nifty.com ([210.131.2.82]:49627 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725308AbfJLE0V (ORCPT ); Sat, 12 Oct 2019 00:26:21 -0400 Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) (authenticated) by conssluserg-03.nifty.com with ESMTP id x9C4QARl002225; Sat, 12 Oct 2019 13:26:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com x9C4QARl002225 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1570854370; bh=u9wmT/Hdot8DTpUJdxXrIyO9KPNJrJCevfN1MDnU3f8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nYyD0KjmUXXABcj9S78TlxMjTQmnh//Ytn2VsWmK2ZketQ1H6SVxWvy1QWX0tQNWg hQkBvFNV+hMZbBR87NecBfH0KV2hPCqFleW4zF52rRfNPxULkb+HRbBbbrg7qcSNuc 6kR45j0wNBsSFV0bNVTfbuD4U+wtNnRWsVT7S/h4/lMW5v7ha0fUfkD5r/SFD6Bc4T JoujFjUpPoajxAMe1CQakP/HS/dnANgvOBWb6sP79jx+5yuAwyHBZsXOi9n1x1AKI3 7+2C0vTVJf5uRgJwufpkUCc4zM8vRk8iFHwDmazS3pia4gCzjeF1O2xrSveJPglr4Y wEkuxrum6Mu4w== X-Nifty-SrcIP: [209.85.217.51] Received: by mail-vs1-f51.google.com with SMTP id v19so7575794vsv.3; Fri, 11 Oct 2019 21:26:10 -0700 (PDT) X-Gm-Message-State: APjAAAVkzPklTOOEf/N/4SE9p86OmFKdJT97rjMTAY97pOB1RAX2jay7 HoOk9Hsj8LuRd9i2OFgca76Fp8j1c6ZxAJ9siiA= X-Received: by 2002:a67:e354:: with SMTP id s20mr11212403vsm.54.1570854369388; Fri, 11 Oct 2019 21:26:09 -0700 (PDT) MIME-Version: 1.0 References: <20191010151443.7399-1-maennich@google.com> <20191010151443.7399-5-maennich@google.com> <20191011153127.GA1283883@kroah.com> <20191011154311.GA192647@google.com> In-Reply-To: <20191011154311.GA192647@google.com> From: Masahiro Yamada Date: Sat, 12 Oct 2019 13:25:32 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] export: avoid code duplication in include/linux/export.h To: Matthias Maennich Cc: Greg Kroah-Hartman , Linux Kernel Mailing List , "Cc: Android Kernel" , Jessica Yu , Martijn Coenen , Lucas De Marchi , Shaun Ruffell , Will Deacon , Linux Kbuild mailing list , linux-modules , Rasmus Villemoes Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 12, 2019 at 12:43 AM Matthias Maennich wrote: > > On Fri, Oct 11, 2019 at 05:31:27PM +0200, Greg Kroah-Hartman wrote: > >On Thu, Oct 10, 2019 at 04:14:43PM +0100, Matthias Maennich wrote: > >> Now that the namespace value is not part of the __ksymtab entry name > >> anymore, we can simplify the implementation of EXPORT_SYMBOL*. By > >> allowing the empty string "" to represent 'no namespace', we can unify > >> the implementation and drop a lot redundant code. That increases > >> readability and maintainability. > >> > >> As Masahiro pointed out earlier, > >> "The drawback of this change is, it grows the code size. When the symbol > >> has no namespace, sym->namespace was previously NULL, but it is now am > >> empty string "". So, it increases 1 byte for every no namespace > >> EXPORT_SYMBOL. A typical kernel configuration has 10K exported symbols, > >> so it increases 10KB in rough estimation." > > > >10Kb of non-swapable memory isn't good. But if you care about that, you > >can get it back with the option to compile away any non-used symbols, > >and that shouldn't be affected by this change, right? > > Rasmus suggested to put the 'aMS' flags on the __ksymtab_strings section > to mitigate this: > https://lore.kernel.org/lkml/f2e28d6b-77c5-5fe2-0bc4-b24955de9954@rasmusvillemoes.dk/ > > I was not yet able to properly test this, so I did not include it in > this series. As I said in the cover letter, this 4th patch might be > optional for 5.4. So, we could defer it to a later time when we have > addressed that properly. This looks the same as my patch, though. Reviewed-by: Masahiro Yamada -- Best Regards Masahiro Yamada