Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755819Ab2JINhd (ORCPT ); Tue, 9 Oct 2012 09:37:33 -0400 Received: from mga09.intel.com ([134.134.136.24]:61262 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755655Ab2JINhb (ORCPT ); Tue, 9 Oct 2012 09:37:31 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,560,1344236400"; d="scan'208";a="224216228" From: Andi Kleen To: Ivo Sieben Cc: , Ingo Molnar , Peter Zijlstra , , Alan Cox , Greg KH Subject: Re: [REPOST] RFC: sched: Prevent wakeup to enter critical section needlessly References: <1348491997-30898-1-git-send-email-meltedpianoman@gmail.com> <1349782235-8896-1-git-send-email-meltedpianoman@gmail.com> Date: Tue, 09 Oct 2012 06:37:27 -0700 In-Reply-To: <1349782235-8896-1-git-send-email-meltedpianoman@gmail.com> (Ivo Sieben's message of "Tue, 9 Oct 2012 13:30:35 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 876 Lines: 27 Ivo Sieben writes: > Check the waitqueue task list to be non empty before entering the critical > section. This prevents locking the spin lock needlessly in case the queue > was empty, and therefor also prevent scheduling overhead on a PREEMPT_RT > system. > > Signed-off-by: Ivo Sieben > --- > > REPOST: > Request for comments: > - Does this make any sense? Looks good to me. Avoiding any spinlock is good. I don't even think you need "careful", if you miss an update it was just as it happened a little later. -Andi -- ak@linux.intel.com -- Speaking for myself only -- 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/