mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Franck Bui-Huu" <vagabon.xyz@gmail.com>
To: "Andy Whitcroft" <apw@shadowen.org>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [SPARSEMEM] confusing uses of SPARSEM_EXTREME (try #2)
Date: Mon, 12 Jun 2006 19:21:59 +0200	[thread overview]
Message-ID: <cda58cb80606121021w22207ef6yf6dfcbf428b144c3@mail.gmail.com> (raw)
In-Reply-To: <448D9577.3040903@shadowen.org>

Hi Andy

2006/6/12, Andy Whitcroft <apw@shadowen.org>:
>
> In my mind the positive option is selecting for code supporting EXTREME
> so it seems to make sense to use that option.

well I find it confusing because in my mind, something like this seems
more logical.

#ifndef CONFIG_SPARSEMEM_STATIC
static struct mem_section *sparse_index_alloc(int nid)
{
        return alloc_bootmem_node(...);
}
#else
static struct mem_section *sparse_index_alloc(int nid)
{
        /* nothing to do here, since it has been statically allocated */
        return 0;
}
#endif

This code only deals with section allocation and the way it's achieved
depends only if the section array has been statically allocated.
There's nothing related on the two-level lookups here, is there ?

And use SPARSEMEM_EXTREME when it deals only with two-level lookups:

#ifdef CONFIG_SPARSEMEM_EXTREME
#define SECTIONS_PER_ROOT       (PAGE_SIZE / sizeof (struct mem_section))
#else
#define SECTIONS_PER_ROOT       1
#endif

> Perhaps the confusion
> comes from a lack of comments there to say that the else case is STATIC.
>

nope but maybe a comment to explain why i386 use SPARSEMEM_STATIC
option could be useful. At least for someone who is not working on
this arch...

Thanks
-- 
               Franck

  reply	other threads:[~2006-06-12 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12  7:00 Franck Bui-Huu
2006-06-12 16:10 ` Dave Hansen
2006-06-13  8:51   ` Franck Bui-Huu
2006-06-12 16:25 ` Andy Whitcroft
2006-06-12 17:21   ` Franck Bui-Huu [this message]
2006-06-12 17:32     ` Andy Whitcroft
2006-06-13  8:34       ` Franck Bui-Huu
2006-06-13 10:05         ` Andy Whitcroft

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=cda58cb80606121021w22207ef6yf6dfcbf428b144c3@mail.gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®