Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp778077yba; Wed, 15 May 2019 09:45:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3ervVKQhs80auOEG7mqydXt6SJ7ZHVki7j8XlB+P1D/kBduWb7ajsR6XxOUw1PqJzI7tI X-Received: by 2002:aa7:9afc:: with SMTP id y28mr48536509pfp.101.1557938753978; Wed, 15 May 2019 09:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557938753; cv=none; d=google.com; s=arc-20160816; b=qNKk2sFJ0wY+LTC1Ey+5FWnXEGmlDB5QncEYjewlSfzs+WwTjnIYId1NzOUvyBS5us R0eby8PYzdpwOfjPxIgnq9WnBMUhYwyxxspydu4ekm8akVkjvKHiBu7V91QXTPZ/m3/1 RoBxAgu4Do37hq1sF4Igdl4TB/PuUKfN+Divv/+yde8wU6IVZaawDvRM/Bdv/09x8pmx NRrMkaecFjnuk+HqdQXrpNiEEiJpO+U8UVFyyf2xc8A9+FS93CAlqwHXK7P2kUKMH4nL bIVp7NYGmg6xXqcKC//4si03fLn3ZAwnfW29pexTSz0de/vGj4SSMBi6vvkZOuY6Ooln 3WtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LFWmpV8Lm1fyxQJMm8Z7yO88zEmKawJucYqlb2bUzLQ=; b=KbuxjBpitUC6DedS5Vya285Nc7jYjUJkFleP79z/qifYLCSQGO1yf6bdqc7jWEftnY yFVl4qVgXIGsoxtb1d5bW8gwNn93iQqv6msxyE5yyHSMUbVt+lhraoVm4aOM9jBtujm9 Y1oNQPvG5PAAiqxSboPsoU0NQTP6sWTG83p36hhbrL3DjmzApKW5axofbYRdv1u6CdYm p53vCa0jmBkuwqWXvixDsXU/D+wtABR6NzB916PCSiM2rz+YtvVEjJrY5i/6b7W9U9KD ZIFH71mRBZxGcdI7Y8kVIT1O4OLJuIaFCZoUfEc7TKnJ/jcraZ/dKq6vo47zXlKwRkS1 W1Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="sRb5I1/0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si2010195pls.393.2019.05.15.09.45.38; Wed, 15 May 2019 09:45:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="sRb5I1/0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727371AbfEOQnF (ORCPT + 99 others); Wed, 15 May 2019 12:43:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39542 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbfEOQnE (ORCPT ); Wed, 15 May 2019 12:43:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LFWmpV8Lm1fyxQJMm8Z7yO88zEmKawJucYqlb2bUzLQ=; b=sRb5I1/01FFguKFh/14b7u3pn XWfGsZjlNhtVArXeFiwSiq2EX+GX5EoldwhEdBYKRPL+7S4fEEq31Qrhvh8zdL6cUdRXY0bUEIgBj 6hmCt77YddaRvV+JDgkDHnYpmE/TfZOBHaMCFHmp/nv7ZWz1wQ3Vl+Nf2NiGCOqM99+zthij8fufg qBBezfWuPdOIAv2rrLRvouYZlMDArybxG/dl6skBG4oFQ0C7W6+B08qi2tKA/dZhMqJ4L6B0N+8BD UNtIDqs4MuFXbeuGCeriB7gOyPV75E2VQti5Q5xtX9ggq+dneyZpsnHdAUesEvKnmRkpB3B9WWqeF xrctqRKdQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQwzd-0007ik-Sr; Wed, 15 May 2019 16:43:02 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5FD0D2029906B; Wed, 15 May 2019 18:43:00 +0200 (CEST) Date: Wed, 15 May 2019 18:43:00 +0200 From: Peter Zijlstra To: Parth Shah Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mingo@redhat.com, dietmar.eggemann@arm.com, dsmythies@telus.net Subject: Re: [RFCv2 5/6] sched/fair: Tune task wake-up logic to pack jitter tasks Message-ID: <20190515164300.GX2589@hirez.programming.kicks-ass.net> References: <20190515135322.19393-1-parth@linux.ibm.com> <20190515135322.19393-6-parth@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190515135322.19393-6-parth@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 15, 2019 at 07:23:21PM +0530, Parth Shah wrote: > @@ -6704,6 +6773,31 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) > return -1; > } > > +#ifdef CONFIG_SCHED_SMT > +/* > + * Select all tasks of type 1(jitter) for task packing > + */ > +static int turbosched_select_idle_sibling(struct task_struct *p, int prev_cpu, > + int target) > +{ > + int new_cpu; > + > + if (unlikely(task_group(p)->turbo_sched_enabled)) { So if you build without cgroups, this is a NULL dereference. Also, this really should not be group based. > + new_cpu = select_non_idle_core(p, prev_cpu); > + if (new_cpu >= 0) > + return new_cpu; > + } > + > + return select_idle_sibling(p, prev_cpu, target); > +} > +#else