lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200611100748.30889.ak@suse.de>
Date:	Fri, 10 Nov 2006 07:48:30 +0100
From:	Andi Kleen <ak@...e.de>
To:	Amul Shah <amul.shah@...sys.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86_64: Make the NUMA hash function nodemap allocation dynamic and remove NODEMAPSIZE


> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ