Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752345AbaLROiL (ORCPT ); Thu, 18 Dec 2014 09:38:11 -0500 Received: from mail-ob0-f175.google.com ([209.85.214.175]:52235 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751697AbaLROiK (ORCPT ); Thu, 18 Dec 2014 09:38:10 -0500 MIME-Version: 1.0 In-Reply-To: References: <20141210163017.092096069@linux.com> <20141215075933.GD4898@js1304-P5Q-DELUXE> Date: Thu, 18 Dec 2014 23:38:09 +0900 Message-ID: Subject: Re: [PATCH 0/7] slub: Fastpath optimization (especially for RT) V1 From: Joonsoo Kim To: Christoph Lameter Cc: Joonsoo Kim , akpm@linuxfoundation.org, Steven Rostedt , LKML , Thomas Gleixner , Linux Memory Management List , Pekka Enberg , Jesper Dangaard Brouer Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2014-12-18 0:36 GMT+09:00 Christoph Lameter : > On Wed, 17 Dec 2014, Joonsoo Kim wrote: > >> Ping... and I found another way to remove preempt_disable/enable >> without complex changes. >> >> What we want to ensure is getting tid and kmem_cache_cpu >> on the same cpu. We can achieve that goal with below condition loop. >> >> I ran Jesper's benchmark and saw 3~5% win in a fast-path loop over >> kmem_cache_alloc+free in CONFIG_PREEMPT. >> >> 14.5 ns -> 13.8 ns >> >> See following patch. > > Good idea. How does this affect the !CONFIG_PREEMPT case? One more this_cpu_xxx makes fastpath slow if !CONFIG_PREEMPT. Roughly 3~5%. We can deal with each cases separately although it looks dirty. #ifdef CONFIG_PREEMPT XXX #else YYY #endif Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/