From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754293AbcJOQzj (ORCPT ); Sat, 15 Oct 2016 12:55:39 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:33319 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751392AbcJOQza (ORCPT ); Sat, 15 Oct 2016 12:55:30 -0400 Date: Sat, 15 Oct 2016 09:55:21 -0700 From: Christoph Hellwig To: zhouxianrong@huawei.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, rientjes@google.com, hannes@cmpxchg.org, chris@chris-wilson.co.uk, vdavydov.dev@gmail.com, mgorman@techsingularity.net, joe@perches.com, shawn.lin@rock-chips.com, iamjoonsoo.kim@lge.com, kuleshovmail@gmail.com, zhouxiyu@huawei.com, zhangshiming5@huawei.com, won.ho.park@huawei.com, tuxiaobing@huawei.com Subject: Re: [PATCH vmalloc] reduce purge_lock range and hold time of Message-ID: <20161015165521.GB31568@infradead.org> References: <1476540769-31893-1-git-send-email-zhouxianrong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476540769-31893-1-git-send-email-zhouxianrong@huawei.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 15, 2016 at 10:12:48PM +0800, zhouxianrong@huawei.com wrote: > From: z00281421 > > i think no need to place __free_vmap_area loop in purge_lock; > _free_vmap_area could be non-atomic operations with flushing tlb > but must be done after flush tlb. and the whole__free_vmap_area loops > also could be non-atomic operations. if so we could improve realtime > because the loop times sometimes is larg and spend a few time. Right, see the previous patch in reply to Joel that drops purge_lock entirely. Instead of your open coded batch counter you probably want to add a cond_resched_lock after the call to __free_vmap_area.