From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756863AbbBQLeH (ORCPT ); Tue, 17 Feb 2015 06:34:07 -0500 Received: from relay.parallels.com ([195.214.232.42]:38257 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbbBQLeE (ORCPT ); Tue, 17 Feb 2015 06:34:04 -0500 Message-ID: <1424172838.5749.27.camel@tkhai> Subject: Re: [PATCH 1/2] sched: Move __task_rq_{, un}lock() to kernel/sched/sched.h From: Kirill Tkhai To: Peter Zijlstra CC: , Ingo Molnar , "Josh Poimboeuf" Date: Tue, 17 Feb 2015 14:33:58 +0300 In-Reply-To: <20150217112616.GU24151@twins.programming.kicks-ass.net> References: <1424170011.5749.20.camel@tkhai> <20150217111116.GL5029@twins.programming.kicks-ass.net> <20150217112616.GU24151@twins.programming.kicks-ass.net> Organization: Parallels Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5-2+b3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [10.24.40.85] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org В Вт, 17/02/2015 в 12:26 +0100, Peter Zijlstra пишет: > 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. > So, we move task_rq_lock() to sched.h, and dl_task_timer() uses it?