From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752136AbdBEKDv (ORCPT ); Sun, 5 Feb 2017 05:03:51 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33627 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774AbdBEKDt (ORCPT ); Sun, 5 Feb 2017 05:03:49 -0500 Date: Sun, 5 Feb 2017 11:03:44 +0100 From: Ingo Molnar To: hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, changbin.du@intel.com, longman@redhat.com, jstancek@redhat.com, akpm@linux-foundation.org, borntraeger@de.ibm.com Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:core/debugobjects] debugobjects: Reduce contention on the global pool_lock Message-ID: <20170205100344.GA8377@gmail.com> References: <1483647425-4135-4-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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