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]
Date:	Tue, 08 Jan 2013 09:15:07 -0800
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	Seth Jennings <sjenning@...ux.vnet.ibm.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nitin Gupta <ngupta@...are.org>,
	Minchan Kim <minchan@...nel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Dan Magenheimer <dan.magenheimer@...cle.com>,
	Robert Jennings <rcj@...ux.vnet.ibm.com>,
	Jenifer Hopper <jhopper@...ibm.com>,
	Mel Gorman <mgorman@...e.de>,
	Johannes Weiner <jweiner@...hat.com>,
	Rik van Riel <riel@...hat.com>,
	Larry Woodman <lwoodman@...hat.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: Re: [PATCHv2 8/9] zswap: add to mm/

On 01/07/2013 12:24 PM, Seth Jennings wrote:
> +struct zswap_tree {
> +	struct rb_root rbroot;
> +	struct list_head lru;
> +	spinlock_t lock;
> +	struct zs_pool *pool;
> +};

BTW, I spent some time trying to get this lock contended.  You thought
the anon_vma locks would dominate and this spinlock would not end up
very contended.

I figured that if I hit zswap from a bunch of CPUs that _didn't_ use
anonymous memory (and thus the anon_vma locks) that some more contention
would pop up.  I did that with a bunch of CPUs writing to tmpfs, and
this lock was still well down below anon_vma.  The anon_vma contention
was obviously coming from _other_ anonymous memory around.

IOW, I feel a bit better about this lock.  I only tested on 16 cores on
a system with relatively light NUMA characteristics, and it might be the
bottleneck if all the anonymous memory on the system is mlock()'d and
you're pounding on tmpfs, but that's pretty contrived.

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