From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756843AbbBQL0W (ORCPT ); Tue, 17 Feb 2015 06:26:22 -0500 Received: from casper.infradead.org ([85.118.1.10]:59759 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755046AbbBQL0V (ORCPT ); Tue, 17 Feb 2015 06:26:21 -0500 Date: Tue, 17 Feb 2015 12:26:16 +0100 From: Peter Zijlstra To: Kirill Tkhai Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Josh Poimboeuf Subject: Re: [PATCH 1/2] sched: Move __task_rq_{, un}lock() to kernel/sched/sched.h Message-ID: <20150217112616.GU24151@twins.programming.kicks-ass.net> References: <1424170011.5749.20.camel@tkhai> <20150217111116.GL5029@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150217111116.GL5029@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 17, 2015 at 12:11:16PM +0100, Peter Zijlstra wrote: > On Tue, Feb 17, 2015 at 01:46:51PM +0300, Kirill Tkhai wrote: > > > > Place it in sched.h, because dl_task_timer() needs it. > > Also remove lockdep check, which is not fit to this > > function. > > No, that lockdep check is valid for all current sites. Also, note that you just proved the reason we didn't have pi_lock there wrong the other day. As per 0f397f2c90ce ("sched/dl: Fix race in dl_task_timer()"): "The only reason we don't strictly need ->pi_lock now is because we're guaranteed to have p->state == TASK_RUNNING here and are thus free of ttwu races". And therefore we should use the full task_rq_lock() here.