From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbcEZLeu (ORCPT ); Thu, 26 May 2016 07:34:50 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50030 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbcEZLet (ORCPT ); Thu, 26 May 2016 07:34:49 -0400 Date: Thu, 26 May 2016 13:34:43 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: Kirill Tkhai , linux-kernel@vger.kernel.org, Ingo Molnar , Vladimir Davydov , Kirill Tkhai , Christoph Lameter Subject: Re: [PATCH 3/3] introduce task_rcu_dereference() Message-ID: <20160526113443.GJ3192@twins.programming.kicks-ass.net> References: <1413962231.19914.130.camel@tkhai> <20141027195339.GA11736@redhat.com> <20141027195446.GD11736@redhat.com> <20160518170218.GY3192@twins.programming.kicks-ass.net> <20160518182318.GA15661@redhat.com> <20160518191045.GP3193@twins.programming.kicks-ass.net> <20160518195733.GA15914@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160518195733.GA15914@redhat.com> 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 Wed, May 18, 2016 at 09:57:33PM +0200, Oleg Nesterov wrote: > Do we really want try_get_task_struct() here? How about the change below? > > To me it would be more clean to do get_task_struct() in task_numa_assign(), > it clearly pairs with put_task_struct(best_task) and task_numa_compare() > looks a bit simpler this way, no need to put_task_struct() if we nullify > cur. > > What do you think? In any case I think the change in sched/fair.c should > probably come as a separate patch, but this is up to you. You are quite right. I've added your SoB to this patch if you don't mind -- and I've attributed the task_rcu_dereference() thing to you too, as all I did was copy paste different bits of your emails together while trying to get my head around it ;-)