From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) by kanga.kvack.org (Postfix) with ESMTP id 0E9C96B006C for ; Thu, 18 Dec 2014 09:38:11 -0500 (EST) Received: by mail-ob0-f176.google.com with SMTP id vb8so3525559obc.7 for ; Thu, 18 Dec 2014 06:38:10 -0800 (PST) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com. [2607:f8b0:4003:c06::22c]) by mx.google.com with ESMTPS id f6si4369706oej.66.2014.12.18.06.38.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 06:38:10 -0800 (PST) Received: by mail-oi0-f44.google.com with SMTP id e131so453008oig.17 for ; Thu, 18 Dec 2014 06:38:09 -0800 (PST) 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 Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Lameter Cc: Joonsoo Kim , akpm@linuxfoundation.org, Steven Rostedt , LKML , Thomas Gleixner , Linux Memory Management List , Pekka Enberg , Jesper Dangaard Brouer 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org