public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Amul Shah <amul.shah@unisys.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86_64: Make the NUMA hash function nodemap allocation dynamic and remove NODEMAPSIZE
Date: Fri, 10 Nov 2006 07:48:30 +0100	[thread overview]
Message-ID: <200611100748.30889.ak@suse.de> (raw)
In-Reply-To: <1163029076.3553.36.camel@ustr-linux-shaha1.unisys.com>


> diff -uprN linux-2.6.19-rc4/arch/x86_64/kernel/e820.c linux-2.6.19-rc4-az/arch/x86_64/kernel/e820.c
> --- linux-2.6.19-rc4/arch/x86_64/kernel/e820.c	2006-10-31 17:38:41.000000000 -0500
> +++ linux-2.6.19-rc4-az/arch/x86_64/kernel/e820.c	2006-11-08 17:55:48.000000000 -0500
> @@ -83,6 +83,12 @@ static inline int bad_addr(unsigned long
>  		return 1;
>  	}
>  
> +	/* NUMA memory to node map */
> +	if (last >= nodemap_addr && addr < nodemap_addr + nodemap_size) {
> +		*addrp = nodemap_addr + nodemap_size;
> +		return 1;
> +	}

Using the e820 allocator will now mean it's rounded up to pages.
That will waste a bit of memory, but i suppose it's ok.

> +	for (i=20; !(bitfield&(1UL << i)) && i<BITS_PER_LONG; i++);

That's find_first_bit() ?  Please use that

>  
> +	shift = extract_lsb_from_nodes(nodes, numnodes);
> +	if ( allocate_cachealigned_memnodemap() )

No extra spaces here please (and in some other places)


> +	u8 *map;
> +	u8 zero;

zero?

>  } ____cacheline_aligned;
>  extern struct memnode memnode;
>  #define memnode_shift memnode.shift
>  #define memnodemap memnode.map
> +#define memnodemapsize memnode.mapsize

Have you checked how much the code .text size changes because
of the pointer reference? If it's a lot phys_to_nid might need to 
be out of lined.

-Andi

  reply	other threads:[~2006-11-10  6:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-08 23:37 [PATCH] x86_64: Make the NUMA hash function nodemap allocation dynamic and remove NODEMAPSIZE Amul Shah
2006-11-10  6:48 ` Andi Kleen [this message]
2006-11-10  9:43   ` Eric Dumazet
2006-11-10  9:46     ` Eric Dumazet
2006-11-10  9:51     ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2006-11-15 21:48 Amul Shah
2006-11-26 20:49 ` Andi Kleen
2006-11-27 10:23   ` Eric Dumazet
2006-11-27 15:32     ` Amul Shah
2006-11-27 15:38       ` Andi Kleen

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=200611100748.30889.ak@suse.de \
    --to=ak@suse.de \
    --cc=amul.shah@unisys.com \
    --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