Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1816554ybk; Thu, 21 May 2020 16:20:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUwKHSLpwZh1dAymTnSFEgz8kHcp5A8ixZJ7Yx6C+cwIHIZDk3+LH38eKlkPHiYMoKffKy X-Received: by 2002:a05:6402:3092:: with SMTP id de18mr931061edb.109.1590103219599; Thu, 21 May 2020 16:20:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590103219; cv=none; d=google.com; s=arc-20160816; b=VrT8Vaj6DiSrfrz5so5PrIPmmp9ZuQUEmKl8GK7GZI5lrQLCrUn8+qa9RB0D5onsMp 9OToIfWTYNe9gGPuDV+ktLekptgshNX+WfQkxJ8c91oHeJ5CdxIUJRo0wBULOKt6RoCQ za8E5x0gCA/5JfjRYjmiviUiE9m+Fk1qRCTcOqig+mX8W4smqogddp1ATUx77eZUuhio 4NMopgJH0YSHQ+VN42wHDJhqSNHz0UO4ZbPW40bgLdEZbOTSGDrdK122Rbajb+7T8+zQ qq32fVet3bYPUZ7Twt6F+yFfOBdC9hLhzOwUPMN2/+hoJejJVZsTb9pqS8bpSpc99czs Pr3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hUoZcotUHvHkDynbBdg2kum8KhHAvdqpz3vVIU74srU=; b=HDO7slTazt4dC38o2OgwbbIXNcBGkp0DuW9zQMsfJn5Q6PAjV8QrAFKT+jFthm2eRu kRKnn8lGzB5dZx85hJzKBDAIwM2TU9aPUoTDeZ+fACjiNbAoQgyYzwskdPjuCAx+i8w8 kNsjSJQ3hhK27FZ5XrBKmt0HOZKXX69inr9lsww1KmK0FX1pwUis68xSP7hZPqnZj4MN PAPEeEyiv5wsVz2pIaWADHAdy3GqHwyBdYUmruLdYEq2/aUNQ6rpD6XQWzbsUW6CZY51 QihKXrAic9Rsqd4ImXowHvxa2p+A2o2g0GWe51gY4JOJdxGkZeMCyzQOeZBC0uUmfbj4 l0XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=Fdu19Bux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si3819889edq.126.2020.05.21.16.19.56; Thu, 21 May 2020 16:20:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=Fdu19Bux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730785AbgEUXQd (ORCPT + 99 others); Thu, 21 May 2020 19:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730716AbgEUXQd (ORCPT ); Thu, 21 May 2020 19:16:33 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED78DC061A0E for ; Thu, 21 May 2020 16:16:32 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id x12so6925692qts.9 for ; Thu, 21 May 2020 16:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hUoZcotUHvHkDynbBdg2kum8KhHAvdqpz3vVIU74srU=; b=Fdu19Bux/T9zm5qDECsrqrKsavHJgzr0BrjJeEkoqgM9U/vqgFdBSQXH4noPwGen8f Q+Gw98IBbkNh619BiVZpXHsN0/WHEPtpiRUPYGdWCFrYWRYz1HHOQwFaztsVqsb5rnaJ wj227OUGoChm2DCYa8nBV+whh4EJaMHlCZ7VE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hUoZcotUHvHkDynbBdg2kum8KhHAvdqpz3vVIU74srU=; b=XHytW3kCs4aCknjCF1R0zGJUTPIlLJ4Ceh6VPfBTaUbshAfGdaLba3JPYtS6VgUicg eD1DSWen/Pq4yc+eFd6dRp7MGChML/1voaXoCfojYDKKuTtQlar2Ei1xr6XJRxRKiUoi 8YYBF7FR2fcCEtmxS9JqXQELF9LSqFvx7JpbnBV18lAld/1KxttBay1GR3lOzIzACkeF KNHTRm2SfQ78r2KacJocAidYph09hNvc2ES/Bw2SeRbTU78nlcKh3qYucEGXjNc3KJYJ y8Hugy9P+DBsSSf7y8/rldyrLtDbahtkdTF6ARjmEt5PL6+GCleDFso1ab2ZOzbiyQXU 3CgA== X-Gm-Message-State: AOAM531+GrJ+MYbJY3t2ge5/DjWDV6r+SpRRQ1gWpaUxLucXUbrksBo6 SE/xL22PXt9Yq1f95EQo8kB5nA== X-Received: by 2002:ac8:3032:: with SMTP id f47mr13381740qte.386.1590102992154; Thu, 21 May 2020 16:16:32 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id 88sm6436462qth.9.2020.05.21.16.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 16:16:31 -0700 (PDT) Date: Thu, 21 May 2020 19:16:31 -0400 From: Joel Fernandes To: vpillai Cc: Nishanth Aravamudan , Julien Desfossez , Peter Zijlstra , Tim Chen , mingo@kernel.org, tglx@linutronix.de, pjt@google.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, keescook@chromium.org, kerrnel@google.com, Phil Auld , Aaron Lu , Aubrey Li , aubrey.li@linux.intel.com, Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , Aaron Lu Subject: Re: [RFC PATCH 07/13] sched: Add core wide task selection and scheduling. Message-ID: <20200521231631.GB246288@google.com> References: <20200521231426.GA246288@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200521231426.GA246288@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 21, 2020 at 07:14:26PM -0400, Joel Fernandes wrote: > On Wed, Mar 04, 2020 at 04:59:57PM +0000, vpillai wrote: [snip] > > + /* > > + * If class_pick is idle or matches cookie, return early. > > + */ > > + if (cookie_equals(class_pick, cookie)) > > + return class_pick; > > + > > + cookie_pick = sched_core_find(rq, cookie); > > + > > + /* > > + * If class > max && class > cookie, it is the highest priority task on > > + * the core (so far) and it must be selected, otherwise we must go with > > + * the cookie pick in order to satisfy the constraint. > > + */ > > + if (prio_less(cookie_pick, class_pick) && > > + (!max || prio_less(max, class_pick))) > > + return class_pick; > > + > > + return cookie_pick; > > +} > > I've been hating on this pick_task() routine for a while now :-). If we add > the task to the tag tree as Peter suggested at OSPM for that other issue > Vineeth found, it seems it could be simpler. Sorry, I meant adding of a 0-tagged (no cookie) task to the tag tree. thanks, - Joel