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:	Wed, 11 Jun 2014 13:34:04 +0900
From:	Joonsoo Kim <iamjoonsoo.kim@....com>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Zhang Yanfei <zhangyanfei.yes@...il.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Andi Kleen <andi@...stfloor.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Richard Yao <ryao@...too.org>,
	Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH v2] vmalloc: use rcu list iterator to reduce
 vmap_area_lock contention

On Tue, Jun 10, 2014 at 11:32:19PM -0400, Peter Hurley wrote:
> PF: none (google.com: peter@...leysoftware.com does not designate permitted sender hosts) client-ip=216.70.64.70;
> Received: from h96-61-95-138.cntcnh.dsl.dynamic.tds.net ([96.61.95.138]:55986 helo=[192.168.1.139])
> 	by n23.mail01.mtsvc.net with esmtpsa (TLSv1:AES128-SHA:128)
> 	(Exim 4.72)
> 	(envelope-from <peter@...leysoftware.com>)
> 	id 1WuZGw-00064f-2L; Tue, 10 Jun 2014 23:32:22 -0400
> Message-ID: <5397CDC3.1050809@...leysoftware.com>
> Date: Tue, 10 Jun 2014 23:32:19 -0400
> From: Peter Hurley <peter@...leysoftware.com>
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
> MIME-Version: 1.0
> To: Joonsoo Kim <iamjoonsoo.kim@....com>, Andrew Morton
> <akpm@...ux-foundation.org>
> CC: Zhang Yanfei <zhangyanfei.yes@...il.com>, Johannes Weiner
> <hannes@...xchg.org>,
> Andi Kleen <andi@...stfloor.org>, linux-mm@...ck.org,
> linux-kernel@...r.kernel.org, Richard Yao <ryao@...too.org>, Eric
> Dumazet <eric.dumazet@...il.com>
> Subject: Re: [PATCH v2] vmalloc: use rcu list iterator to reduce vmap_area_lock
> contention
> References: <1402453146-10057-1-git-send-email-iamjoonsoo.kim@....com>
> In-Reply-To: <1402453146-10057-1-git-send-email-iamjoonsoo.kim@....com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: 7bit
> X-Authenticated-User: 990527 peter@...leysoftware.com
> X-MT-ID: 8FA290C2A27252AACF65DBC4A42F3CE3735FB2A4
> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
> Sender: owner-linux-mm@...ck.org
> Precedence: bulk
> X-Loop: owner-majordomo@...ck.org
> List-ID: <linux-mm.kvack.org>
> Status: O
> Content-Length: 3338
> Lines: 96
> 
> On 06/10/2014 10:19 PM, Joonsoo Kim wrote:
> >Richard Yao reported a month ago that his system have a trouble
> >with vmap_area_lock contention during performance analysis
> >by /proc/meminfo. Andrew asked why his analysis checks /proc/meminfo
> >stressfully, but he didn't answer it.
> >
> >https://lkml.org/lkml/2014/4/10/416
> >
> >Although I'm not sure that this is right usage or not, there is a solution
> >reducing vmap_area_lock contention with no side-effect. That is just
> >to use rcu list iterator in get_vmalloc_info().
> >
> >rcu can be used in this function because all RCU protocol is already
> >respected by writers, since Nick Piggin commit db64fe02258f1507e13fe5
> >("mm: rewrite vmap layer") back in linux-2.6.28
> 
> While rcu list traversal over the vmap_area_list is safe, this may
> arrive at different results than the spinlocked version. The rcu list
> traversal version will not be a 'snapshot' of a single, valid instant
> of the entire vmap_area_list, but rather a potential amalgam of
> different list states.

Hello,

Yes, you are right, but I don't think that we should be strict here.
Meminfo is already not a 'snapshot' at specific time. While we try to
get certain stats, the other stats can change.
And, although we may arrive at different results than the spinlocked
version, the difference would not be large and would not make serious
side-effect.

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