Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5070255yba; Wed, 10 Apr 2019 10:39:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwX3LDeT9kWbfLU5UKXB7VsxvzEScPTV5UtJ3J/7/FOEs8Hho+NytEDS65909X8T/0cabfQ X-Received: by 2002:a65:6284:: with SMTP id f4mr42552344pgv.11.1554917992020; Wed, 10 Apr 2019 10:39:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554917992; cv=none; d=google.com; s=arc-20160816; b=JS9QwuiZxQYIwwanIFGzIj/07E+7Zo9O9Ya5N71AJCp8wRjvFK+vY70SYnYyemzB3Z U8Bo8I64RMO8d0kkk5R2RDqpqOjfX/qDw9KixRA7jU6yaN98a3PJ5EVFmiMUv+yfCEAt E7J8ZIxRuD3Y5eQlI+s4Xs8MpGLKZZHyKNCtnCyoGrDXZAa7lBozxrVVrZgD43sd479t C+w3mm+Ma4IH0QeHqHNs4RZaaz1S+S5lGuMUh4dIB1U1cVcuEMDUo0FN2xB6UUD4ha5X LLucMyy5a3MZoMyyFk/a6WSfrE6SD0uEs2tZyqTbnPPzgzj6mhqlqAewXrzbEBz6GDEC KVwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tvIi4gBRIzauHyn+/17L1Jg3co02CCis5UuW49+Fkic=; b=McbOOP6iMQdh9/tANpQ3vKXI6qQ94tVYxAcBomztBfEYjFYhvFZ2te6t7VY4BMYFQd MwYvh49I6y8vMNrKBDwZXDFLzd1f76KZiRv7nMYPc0f+U1sHrEMZ5TY8udfCkx4jR0pO nd6uf5cG/kpKskoXapDUudYFmMnwGz4EnDT/9oIDyHV18CA0qgzdagSEqGmGxs1YaQEn KHp1/rnijN8bQ6Vm2bv8SnjEVuhCZKdSya1EUmX8Luj8TjaCbRJ1MnwKn2qj+t/etHkE DkOqsKHLyDvSqg0HsVVNfsBVFDxoA9y+bjxGTnjm9BkjKnFyiOtQfIEv52BLLzWDbQVY 3arw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TBdoOy6g; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si14125372pfr.47.2019.04.10.10.39.36; Wed, 10 Apr 2019 10:39:52 -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=pass header.i=@gmail.com header.s=20161025 header.b=TBdoOy6g; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732568AbfDJOSY (ORCPT + 99 others); Wed, 10 Apr 2019 10:18:24 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:34849 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731287AbfDJOSX (ORCPT ); Wed, 10 Apr 2019 10:18:23 -0400 Received: by mail-lf1-f68.google.com with SMTP id u21so1993653lfu.2 for ; Wed, 10 Apr 2019 07:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tvIi4gBRIzauHyn+/17L1Jg3co02CCis5UuW49+Fkic=; b=TBdoOy6gIftbr3TE+ENeS5qPHiRQkHm/3QsV/yTkaxzEbkqemBfL5lPRCNf5TScIhc W5DZKehOkc3DdI+yQLJOM8tH/gjIjaCOCWyZH9lY0hCbKzWN79qZstIj6z0EuQntb/X4 t0QNQSi3uXvZQwWu7Z12kij5JSm3Mf2yfOzvPvBQyICRPE1zm0EB6Ca2RtoTTqUf6TzG IOg2QBuNokxscI8Sww7WR0DRrFtMR6H1P1J8sLCYXakTgGsuS7nESonenwNmBaZTLj0j B0+KzguUe5NwrJyRIP3h6fo9Adxa5Zh9L68zegYtEIGuFGKKnmVqJwA3EfyeN8BsQK3i UCYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tvIi4gBRIzauHyn+/17L1Jg3co02CCis5UuW49+Fkic=; b=lHC0gGWOzQ19wUNIvCida4tlWTgvgOzEXkv7MBdSxEinb7OQj6KVUCcBvpaxu9rpnn 1t8SrkaIWCOYlc8Phu8ZGekNKYrnXRofB/bfXsHvK+8R75zdUm0gCcfXnbw9qzPx//tl QIWrQqPIkHkMpobXlDz2toV3KIylxaDFjbPptMT5RA4xqI0I+sdpiYYYH4iCbYp/PIRQ TX48SyvZkjBpJ/eqSQ44HMHvBDgtcBL49W/iTbz2gW5X0BpZSFwq/sxHaVjiyKmo3Dt7 kVXXswzdMOYjDUeIuSdKMzjhCAkOUMwB2DCYevs3+jkiwL+Cl3JCU6UE4PFJYbnwpzht VswA== X-Gm-Message-State: APjAAAXmj956lQRrjWNrgluIsp5/rrfjq3y8pO6EFeOymCJNq4NNUWfP USCBJhL242GOIbAYqF31VClwHueP21Z6DG2Xmzw= X-Received: by 2002:ac2:44a6:: with SMTP id c6mr23602158lfm.31.1554905901715; Wed, 10 Apr 2019 07:18:21 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20190410043633.GA67532@aaronlu> From: Aubrey Li Date: Wed, 10 Apr 2019 22:18:10 +0800 Message-ID: Subject: Re: [RFC][PATCH 13/16] sched: Add core wide task selection and scheduling. To: Aaron Lu Cc: Tim Chen , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , Subhra Mazumdar , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Kees Cook , Greg Kerr , Aubrey Li , Julien Desfossez Content-Type: text/plain; charset="UTF-8" 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 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? Thanks, -Aubrey