From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752068AbdBFWJN (ORCPT ); Mon, 6 Feb 2017 17:09:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59638 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414AbdBFWJL (ORCPT ); Mon, 6 Feb 2017 17:09:11 -0500 Subject: Re: [tip:core/debugobjects] debugobjects: Reduce contention on the global pool_lock To: Ingo Molnar , hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, changbin.du@intel.com, jstancek@redhat.com, akpm@linux-foundation.org, borntraeger@de.ibm.com References: <1483647425-4135-4-git-send-email-longman@redhat.com> <20170205100344.GA8377@gmail.com> Cc: linux-tip-commits@vger.kernel.org From: Waiman Long Organization: Red Hat Message-ID: <7cc1ba2c-b8f3-3f64-f093-0b5600f676e1@redhat.com> Date: Mon, 6 Feb 2017 17:09:10 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170205100344.GA8377@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 06 Feb 2017 22:09:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/05/2017 05:03 AM, Ingo Molnar wrote: > * tip-bot for Waiman Long wrote: > >> --- >> lib/debugobjects.c | 31 ++++++++++++++++++++++--------- >> 1 file changed, 22 insertions(+), 9 deletions(-) >> >> diff --git a/lib/debugobjects.c b/lib/debugobjects.c >> index dc78217..5476bbe 100644 >> --- a/lib/debugobjects.c >> +++ b/lib/debugobjects.c >> @@ -172,25 +172,38 @@ alloc_object(void *addr, struct debug_bucket *b, struct debug_obj_descr *descr) >> >> /* >> * workqueue function to free objects. >> + * >> + * To reduce contention on the global pool_lock, the actual freeing of >> + * debug objects will be delayed if the pool_lock is busy. We also free >> + * the objects in a batch of 4 for each lock/unlock cycle. >> */ >> +#define ODEBUG_FREE_BATCH 4 >> static void free_obj_work(struct work_struct *work) >> { > Please put an extra newline before function definitions. > > Looks good otherwise! > > Thanks, > > Ingo Sure, I can do that. BTW the debugobjects patch was also pull into the -mm tree a little while ago. Will that be a problem? -Longman