Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5425164yba; Wed, 10 Apr 2019 20:07:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4z1QWX6bzRMzWJtHzZtuHQ7JiNsow81VZkXNWdwrnGNPZ1qnfq/urxsgxc5/EL7wEfWu6 X-Received: by 2002:a62:3849:: with SMTP id f70mr47842289pfa.46.1554952045952; Wed, 10 Apr 2019 20:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554952045; cv=none; d=google.com; s=arc-20160816; b=cxCdiInTYGWwM5VLpxngFT7X686Lu64pY20JXosF3XQqLfmaNzD8cFygcb0T6qpdUN 5GRq/MfoCm2lTCFzFKL81rOp4xoWJvhBnozn9iLwiHOX3FSJXRCY0/bbItLux7esrVHG UBSG4XwfWh1Yt3f6Fk5t5dDA+7mCXrzf965PwO8M8Pr+2Sq7BFzjVq7zFcU7vaWyUvOX lYw5F7XqRj06gK7ow6t+zbVly7AW7KC21PXJHnUFrfeaSv2ofhL5qeDhR7OJ6OZ1INXz J3ZUm8aYKcGYCUA28Sd9yYkUrQST/1J60TH9n2619GRyBpY2ovXo9t1ulyY0Tu3WnTEd 2O3A== 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; bh=CLQDauSdUExU3h9iDTnHQ+rVriabQEgZlN597TOTkag=; b=yCV7A+2a06IH6Trjxq+MJjt2s5Mr7sOkfgvz+0yk9NvEbaLBVNXiTGa6JNlddFR6SW 4V97P1hObVBzFe2shqqKjcREzLj1kOyT0A5bLr8tF/VGclQ6z5n5SHjv8lCtaa9DYk5Z 7bbnf/xANL/RpONu2vRlaA44Za1StJ6IC8TYqtsUPjX0syHtS5rp4W5NOp2ITcLV5CVo u8LlT+8AdegmffiytlHKCdNS7xKxWzl/P9Fh0QwSn58xoANKsVe+yPQecixmPQsx2hSW DZFQg9k3zqv5HxUwchPhWAybU5kSk0qPkIJtREDaO/2AMAUSoln3Lyi8Ke/lv2h7mGFK Ub3g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si35056710pll.324.2019.04.10.20.07.09; Wed, 10 Apr 2019 20:07:25 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbfDKDFw (ORCPT + 99 others); Wed, 10 Apr 2019 23:05:52 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:26187 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfDKDFv (ORCPT ); Wed, 10 Apr 2019 23:05:51 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04391;MF=aaron.lu@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0TP0HtHW_1554951941; Received: from aaronlu(mailfrom:aaron.lu@linux.alibaba.com fp:SMTPD_---0TP0HtHW_1554951941) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Apr 2019 11:05:48 +0800 Date: Thu, 11 Apr 2019 11:05:41 +0800 From: Aaron Lu To: Peter Zijlstra Cc: Tim Chen , mingo@kernel.org, tglx@linutronix.de, pjt@google.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, subhra.mazumdar@oracle.com, fweisbec@gmail.com, keescook@chromium.org, kerrnel@google.com, Aubrey Li , Julien Desfossez Subject: Re: [RFC][PATCH 13/16] sched: Add core wide task selection and scheduling. Message-ID: <20190411030541.GA99895@aaronlu> References: <20190218165620.383905466@infradead.org> <20190218173514.667598558@infradead.org> <20190402064612.GA46500@aaronlu> <20190402082812.GJ12232@hirez.programming.kicks-ass.net> <20190405145530.GA453@aaronlu> <460ce6fb-6a40-4a72-47e8-cf9c7c409bef@linux.intel.com> <20190410043633.GA67532@aaronlu> <20190410144418.GH2490@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190410144418.GH2490@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2019 at 04:44:18PM +0200, Peter Zijlstra wrote: > On Wed, Apr 10, 2019 at 12:36:33PM +0800, Aaron Lu wrote: > > On Tue, Apr 09, 2019 at 11:09:45AM -0700, Tim Chen wrote: > > > Now that we have accumulated quite a number of different fixes to your orginal > > > posted patches. Would you like to post a v2 of the core scheduler with the fixes? > > > > One more question I'm not sure: should a task with cookie=0, i.e. tasks > > that are untagged, be allowed to scheduled on the the same core with > > another tagged task? > > That was not meant to be possible. Good to know this. > > The current patch seems to disagree on this, e.g. in pick_task(), > > if max is already chosen but max->core_cookie == 0, then we didn't care > > about cookie and simply use class_pick for the other cpu. This means we > > could schedule two tasks with different cookies(one is zero and the > > other can be tagged). > > When core_cookie==0 we shouldn't schedule the other siblings at all. Not even with another untagged task? I was thinking to leave host side tasks untagged, like kernel threads, init and other system daemons or utilities etc., and tenant tasks tagged. Then at least two untagged tasks can be scheduled on the same core. Kindly let me know if you see a problem with this. > > But then sched_core_find() only allow idle task to match with any tagged > > tasks(we didn't place untagged tasks to the core tree of course :-). > > > > Thoughts? Do I understand this correctly? If so, I think we probably > > want to make this clear before v2. I personally feel, we shouldn't allow > > untagged tasks(like kernel threads) to match with tagged tasks. > > Agreed, cookie should always match or idle. Thanks a lot for the clarification.