From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756134AbaE2UFr (ORCPT ); Thu, 29 May 2014 16:05:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44337 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756058AbaE2UFp (ORCPT ); Thu, 29 May 2014 16:05:45 -0400 Date: Thu, 29 May 2014 13:05:44 -0700 From: Andrew Morton To: Joonsoo Kim Cc: Zhang Yanfei , Johannes Weiner , Andi Kleen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Richard Yao Subject: Re: [PATCH] vmalloc: use rcu list iterator to reduce vmap_area_lock contention Message-Id: <20140529130544.56213f048f331723329ff828@linux-foundation.org> In-Reply-To: <1401344554-3596-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1401344554-3596-1-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 May 2014 15:22:34 +0900 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(). This function only needs > values on vmap_area structure, so we don't need to grab a spinlock. The mixture of rcu protection and spinlock protection for vmap_area_list is pretty confusing. Are you able to describe the overall design here? When and why do we use one versus the other?