mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: "Huang, Ying" <ying.huang@intel.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Dan Williams <dan.j.williams@intel.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	<linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] resource, kunit: add dependency on SPARSEMEM
Date: Thu, 26 Sep 2024 11:45:40 -0700	[thread overview]
Message-ID: <66f5abd431dce_964f2294b9@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <87a5fxtqbl.fsf@yhuang6-desk2.ccr.corp.intel.com>

Huang, Ying wrote:
> Geert Uytterhoeven <geert@linux-m68k.org> writes:
> 
> > Hi Huang,
> >
> > On Tue, Sep 24, 2024 at 3:25 AM Huang, Ying <ying.huang@intel.com> wrote:
> >> Guenter Roeck <linux@roeck-us.net> writes:
> >> > On 9/23/24 05:58, Geert Uytterhoeven wrote:
> >> >> Hi Günter,
> >> >> On Mon, Sep 23, 2024 at 12:50 AM Guenter Roeck <linux@roeck-us.net>
> >> >> wrote:
> >> >>> Building allmodconfig images on systems with SPARSEMEM=n results in
> >> >>> the following message.
> >> >>>
> >> >>> WARNING: unmet direct dependencies detected for GET_FREE_REGION
> >> >>>    Depends on [n]: SPARSEMEM [=n]
> >> >>>    Selected by [m]:
> >> >>>    - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
> >
> >> After Linus' fix for PHYSMEM_END, GET_FREE_REGION doesn't need to depend
> >> on SPARSEMEM anymore.  So, I think we can remove the dependency.  Can
> >> you check whether the following patch work for you on top of latest
> >> upstream kernel (with Linus' fix).
> >
> > Yes it does, thanks!
> >
> > One remaining issue is that RESOURCE_KUNIT_TEST selects GET_FREE_REGION.
> > IMHO merely enabling a test should not enable extra functionality
> > in the kernel.  Can the individual test(s) that do depend on
> > GET_FREE_REGION be protected by #ifdef CONFIG_GET_FREE_REGION instead?
> 
> After checking GET_FREE_REGION, I don't think that it's a special
> functionality.  I guess it's selectable because it depends on SPARSEMEM
> and to reduce code size.
> 
> Hi, Dan, please correct me if I'm wrong here.

Right, the only reason it is selectable is just to be mindful is
micro-bloat in kernel/resource.c for the small number of drivers that
need that call.

> So, to reduce #ifdef in .c file as much as possible and make code
> simpler, I prefer to select it for RESOURCE_KUNIT_TEST.

I agree with the result, but for a different rationale.

RESOURCE_KUNIT_TEST is simply another "driver" that needs
GET_FREE_REGION. So while I agree with the general idea that "enabling a
test should not enable extra functionality", in this case the *test* is
the extra functionality and GET_FREE_REGION comes along for the ride.

  reply	other threads:[~2024-09-26 18:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 22:50 Guenter Roeck
2024-09-23  1:11 ` Huang, Ying
2024-09-23 12:58 ` Geert Uytterhoeven
2024-09-23 13:39   ` Guenter Roeck
2024-09-23 13:47     ` Geert Uytterhoeven
2024-09-23 14:23       ` Guenter Roeck
2024-09-23 14:54       ` Guenter Roeck
2024-09-23 16:01         ` Geert Uytterhoeven
2024-09-23 16:25           ` Guenter Roeck
2024-09-24  1:21     ` Huang, Ying
2024-09-24  2:41       ` Guenter Roeck
2024-10-10  6:40         ` Huang, Ying
2024-10-10 16:01           ` Guenter Roeck
2024-10-12  3:43             ` Huang, Ying
2024-10-12  9:36               ` Guenter Roeck
2024-09-24  7:56       ` Geert Uytterhoeven
2024-09-24  8:21         ` Huang, Ying
2024-09-26 18:45           ` Dan Williams [this message]
2024-09-27  1:41             ` Huang, Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66f5abd431dce_964f2294b9@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=torvalds@linux-foundation.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®