Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754156Ab0ALKmh (ORCPT ); Tue, 12 Jan 2010 05:42:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754079Ab0ALKmg (ORCPT ); Tue, 12 Jan 2010 05:42:36 -0500 Received: from mail-pw0-f42.google.com ([209.85.160.42]:33764 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754067Ab0ALKmf (ORCPT ); Tue, 12 Jan 2010 05:42:35 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=bBMxvKduDDItjHoeYfy9C6+Z4UYkSTAnt7DJI9IZzvMrcabCiUf4wr0zSzM9K09unz NsxR5QP7c2jUxK2IurJQg5iCqQqIgy+t0AyD4qRxKl3LPpIBP3/3ZQ0EucdOoUoiytSj ioDAZGTHOoCTilyrcHXKqdA7RIK+SOv2dn+5w= MIME-Version: 1.0 Date: Tue, 12 Jan 2010 16:42:35 +0600 Message-ID: Subject: [PATCH] sched: Move level 'again' after get_cpu() in sched_exec. From: Rakib Mullick To: LKML Cc: Ingo Molnar , Peter Zijlstra Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 803 Lines: 25 sched: move level again after get_cpu(). We can get this_cpu by calling get_cpu() once and it remains same. We don't need to call it again. Signed-off-by: Rakib Mullick --- --- linus/kernel/sched.c 2010-01-06 20:11:10.000000000 +0600 +++ rakib/kernel/sched.c 2010-01-12 16:01:54.000000000 +0600 @@ -3143,8 +3143,8 @@ void sched_exec(void) unsigned long flags; struct rq *rq; -again: this_cpu = get_cpu(); +again: dest_cpu = select_task_rq(p, SD_BALANCE_EXEC, 0); if (dest_cpu == this_cpu) { put_cpu(); -- 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/