Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5397850yba; Wed, 10 Apr 2019 19:13:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFf8WwgoQdeILX7pxzFKI/oCWvnNNMivOX8+pJjh8OBtY1BxYzNLt0+FOCWdBqNlhSmQKO X-Received: by 2002:a17:902:29:: with SMTP id 38mr24693607pla.178.1554948785189; Wed, 10 Apr 2019 19:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554948785; cv=none; d=google.com; s=arc-20160816; b=BtiWGJD5D4TLwhkRKS6jM1wwLuz9Txk2oeTlkD0g/oX0l2APzLm+fhvv7C64ulisv4 8wGni1fHoci1Oo7U7dhDWy0UiL5JcpffIhN3ePcvc/RHTm4x4W7HbFo+won3HvKntwWe ggUq9RXp6OB6qzA7A6b0E0psTg7zp3rckLuBE6pc+FySAzSqyfX5+s9/sFK9K9BcQSCO SjWkigdfHR4bwN37Z/7VrQNcNGZGcSQ2M2Zpj0Duj3yKM6iP2QOrcy4W7qodYRE43hwv Y82+9V0Of33MqvLD/34VJclnRHZ32Velx0P8X/8e/HyHodWVbhg5iXlybn0ykP3g7TSK QGPA== 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=iVKXtbw9lkZDTuC4V5tEaj6tFuYQC5HH93rJqpG5fDc=; b=y4Ix/N0is5nnFG/oqsTCtOpdkp/mUmtvYI87OYHfRvzQb8zdrQpzxZKisDRIPrW+Ta kumdMBwne/2D7ELLmwOgpwKdwPwNpNlWjsnIuPv8B+WIgwT5emyN72QwuVIy8G0cxzNO 5kHOIunvwN39sROvFL0qT+qh/z5MSFdd5270guqFdDE1ZXdLF87A7jdKi3xmPIzgM8a3 vFSY0pdo8tPfJY06MAJKMtwfB95iVncveqV2vUmIrF7LGmd2uZ0lBUmE4enuImjguNHi azDby/38WgaoOB2bywI/aFTFKskPYfUV1lpvQwwGVVifZLW+UweVHYSRQ131eFy8OkeQ 9PjQ== 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 m7si9576027pls.114.2019.04.10.19.12.48; Wed, 10 Apr 2019 19:13:05 -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 S1726623AbfDKCMF (ORCPT + 99 others); Wed, 10 Apr 2019 22:12:05 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:41725 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfDKCMF (ORCPT ); Wed, 10 Apr 2019 22:12:05 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;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_---0TP.w4FA_1554948713; Received: from aaronlu(mailfrom:aaron.lu@linux.alibaba.com fp:SMTPD_---0TP.w4FA_1554948713) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Apr 2019 10:11:59 +0800 Date: Thu, 11 Apr 2019 10:11:53 +0800 From: Aaron Lu To: Aubrey Li Cc: Tim Chen , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , Subhra Mazumdar , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Kees Cook , Greg Kerr , Julien Desfossez Subject: Re: [RFC][PATCH 13/16] sched: Add core wide task selection and scheduling. Message-ID: <20190411021153.GA80125@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 10:18:10PM +0800, Aubrey Li wrote: > On Wed, Apr 10, 2019 at 12:36 PM 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? > > > > 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). > > > > 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. > > Does it make sense if we take untagged tasks as hypervisor, and different > cookie tasks as different VMs? Isolation is done between VMs, not between > VM and hypervisor. > > Did you see anything harmful if an untagged task and a tagged task > run simultaneously on the same core? VM can see hypervisor's data then, I think. We probably do not want that happen.