From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933108AbcJRC6z (ORCPT ); Mon, 17 Oct 2016 22:58:55 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:41347 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932993AbcJRC6y (ORCPT ); Mon, 17 Oct 2016 22:58:54 -0400 Subject: Re: [PATCH vmalloc] reduce purge_lock range and hold time of To: Christoph Hellwig References: <1476540769-31893-1-git-send-email-zhouxianrong@huawei.com> <20161015165521.GB31568@infradead.org> CC: , , , , , , , , , , , , , , , From: zhouxianrong Message-ID: Date: Tue, 18 Oct 2016 10:55:26 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20161015165521.GB31568@infradead.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.145.228] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hey Hellwig: cond_resched_lock is a good choice. i mixed the cond_resched_lock and batch to balance of realtime and performance and resubmit this patch. On 2016/10/16 0:55, Christoph Hellwig wrote: > 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. > > . >