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: <200706072137.34563.ioe-lkml@rameria.de>
Date:	Thu, 7 Jun 2007 21:37:33 +0200
From:	Ingo Oeser <ioe-lkml@...eria.de>
To:	Nadia.Derbey@...l.net
Cc:	linux-kernel@...r.kernel.org, ebiederm@...ssion.com, ak@...e.de
Subject: Re: [RFC][PATCH 1/6] Storing ipcs into radix trees

Hi Nadia,

good to see someone is pounding this old beast again :-)

On Thursday 07 June 2007, Nadia.Derbey@...l.net wrote:
> Index: linux-2.6.21/ipc/util.h
> ===================================================================
> --- linux-2.6.21.orig/ipc/util.h	2007-06-07 11:00:30.000000000 +0200
> +++ linux-2.6.21/ipc/util.h	2007-06-07 11:07:22.000000000 +0200
> @@ -13,6 +13,8 @@
>  #define USHRT_MAX 0xffff
>  #define SEQ_MULTIPLIER	(IPCMNI)
>  
> +#define IPCS_MAX_SCAN_ENTRIES 256

That ...

> Index: linux-2.6.21/ipc/util.c
> ===================================================================
> --- linux-2.6.21.orig/ipc/util.c	2007-06-07 11:00:30.000000000 +0200
> +++ linux-2.6.21/ipc/util.c	2007-06-07 11:29:43.000000000 +0200
> @@ -252,72 +241,94 @@ void __init ipc_init_proc_interface(cons
>   *	@key: The key to find
>   *	
>   *	Requires ipc_ids.mutex locked.
> - *	Returns the identifier if found or -1 if not.
> + *	Returns the LOCKED pointer to the ipc structure if found or NULL
> + *	if not.
> + *      If key is found ipc contains its ipc structure
>   */
>   
> -int ipc_findkey(struct ipc_ids* ids, key_t key)
> +struct kern_ipc_perm *ipc_findkey(struct ipc_ids *ids, key_t key)
>  {
> -	int id;
> -	struct kern_ipc_perm* p;
> -	int max_id = ids->max_id;
> +	struct kern_ipc_perm *ipc;
> +	struct kern_ipc_perm *ipcs[IPCS_MAX_SCAN_ENTRIES];

... together with this means 4*256 -> 1k of precious stack space used.
Please consider either lowering IPCS_MAX_SCAN_ENTRIES or kmalloc() that.

Same problem with your third patch called 
"Changing the loops on a single ipcid into radix_tree_gang_lookup() calls"

If you cannot sleep, try to lower that constant (e.g. 16-32). 
The current users use much smaller numbers.

If you can sleep and performance goes down after lowering that constant,
try to kmalloc these arrays (since kmalloc() of that small amount 
should succeed easily).



Regards

Ingo Oeser
-
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