From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753927Ab3JJHc1 (ORCPT ); Thu, 10 Oct 2013 03:32:27 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59262 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751737Ab3JJHc0 (ORCPT ); Thu, 10 Oct 2013 03:32:26 -0400 Date: Thu, 10 Oct 2013 00:33:15 -0700 From: Andrew Morton To: Ingo Molnar Cc: Peter Zijlstra , Oleg Nesterov , Paul McKenney , Mel Gorman , Rik van Riel , Srikar Dronamraju , Andrea Arcangeli , Johannes Weiner , Thomas Gleixner , Steven Rostedt , Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/6] Optimize the cpu hotplug locking -v2 Message-Id: <20131010003315.f49dacdf.akpm@linux-foundation.org> In-Reply-To: <20131010072757.GB17990@gmail.com> References: <20131008102505.404025673@infradead.org> <20131009225006.7101379c.akpm@linux-foundation.org> <20131010062741.GA9999@gmail.com> <20131009233419.ea3d0b80.akpm@linux-foundation.org> <20131010072757.GB17990@gmail.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Oct 2013 09:27:57 +0200 Ingo Molnar wrote: > > > Should be fairly straightforward to test: the sys_sched_getaffinity() > > > and sys_sched_setaffinity() syscalls both make use of > > > get_online_cpus()/put_online_cpus(), so a testcase frobbing affinities > > > on N CPUs in parallel ought to demonstrate scalability improvements > > > pretty nicely. > > > > Well, an in-kernel microbenchmark which camps in a loop doing get/put > > would measure this as well. > > > > But neither approach answers the question "how useful is this patchset". > > Even ignoring all the other reasons cited, sys_sched_getaffinity() / > sys_sched_setaffinity() are prime time system calls, and as long as the > patches are correct, speeding them up is worthwhile. That I would not have guessed. What's the use case for calling get/set_affinity at high frequency?