Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3931543ybl; Mon, 12 Aug 2019 08:40:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyev7KK9uEZSDeTsQl7gNBDmvmbeiUmNqbPgcZk1qzzfd/p0lKHae0CNlkoUqXiEbgsnQ3S X-Received: by 2002:a17:90a:30ad:: with SMTP id h42mr3940950pjb.31.1565624405999; Mon, 12 Aug 2019 08:40:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565624405; cv=none; d=google.com; s=arc-20160816; b=J3TfdUvprPsMHISEcQCr2MIsfu/fpIOhurxfPfvt9hrPGXjzS50USCwQJdbcMgtNlz L0JHefjcoNt/P39c4oFJFA7xbjU1NmvsXQQ/pvv12JkIs3Qoiur7wkEQx+VAVV9QvZ+a 5KjvegmYA5jvp/OCkML34Qv7Qs0sU22Rg218olhnGbkbaHr2iv5zw2R6TRPCgUTs5F8J y0nj951xB3VbUnraOsI+jnlWKqmx98JNKkcDKOOf2HsJrQ/DESzspv+LuF5lYjSfIPBP KCLzslEmE7YFTrZ1emZ1iXFxPQvlRxFIe3FWn1KOGhEFmvT0pbj71OUyis92Vv8r1ht7 IrIA== 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=zyjyZ9IF9yKP9YmOo1rW3lIJcoNsTg3G/mxjlSrkZUo=; b=ZFxY8cpxfGdGHjgLUQ/h2NADDaIEQ5eSGWdm2qVNVTZFU9vo1RiDOI+yC2qi2qZHkB JgQgEKB0CG/qqT7dtcSIxg1Caxj2ROqazvaAEoSpZWWG1TYCeNBqW0WIE4WjJx5hZ7LN K/D1zlkPe1tSgjyPQv6+gFGwmHOxqUWgXR6uz54QTAM4iTV1eNLdGJsNuPgcnWRFOvbC /aogwn0kZGxHCXdcaSmtGSBtXsGMyvpCawbDV1v6Po2ZseuiNra3gIoiMa6rdavbLpWb 0RM0AaX5l9q3oMwl/Vo3YchUBaBrJnJZBIugqSXaHKNQsCIi0MqyClIVVU0C0EPs+tHg mI9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digitalocean.com header.s=google header.b="SM/72PML"; 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=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g31si58671519pld.8.2019.08.12.08.39.50; Mon, 12 Aug 2019 08:40: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; dkim=pass header.i=@digitalocean.com header.s=google header.b="SM/72PML"; 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=REJECT sp=REJECT dis=NONE) header.from=digitalocean.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726717AbfHLPi7 (ORCPT + 99 others); Mon, 12 Aug 2019 11:38:59 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:43116 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfHLPi7 (ORCPT ); Mon, 12 Aug 2019 11:38:59 -0400 Received: by mail-ot1-f68.google.com with SMTP id e12so16113936otp.10 for ; Mon, 12 Aug 2019 08:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalocean.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zyjyZ9IF9yKP9YmOo1rW3lIJcoNsTg3G/mxjlSrkZUo=; b=SM/72PMLIelCgb3lWyhM30lVs68LiFi8DHWN+LknWn/Quh++yBKmoxum74Yfqt4CXT o9UnOy3vy4mgfQGk1vtF13V30voHjEZ6x0TR2/iDvIqffznKarydUaZcQrxzHrjM4gqP u78rLuBlzrnVFuoSQjrPdOQuOuvgBcWAdiZzo= 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=zyjyZ9IF9yKP9YmOo1rW3lIJcoNsTg3G/mxjlSrkZUo=; b=bxCLfJt4RkMQzcYjcOXyApqHVyTJqGW5qKN+YNA3MChVDCs+RGjn8sP0hHJaLAutf7 57VvwiBJc3kH0G4zHSZj1hp6GX8OIJTPnkA7hHUZs9nZaqZzOBRiG7chM16cm61pUYAs pGwTfWg7ouRr0J3L65KNC+weR+7R1dYsHYWs8fvz+RAQZxLXI4CFzCrWDnSy2cg/bo03 4QxnnBqnkOOt9hDBoA8bk6FdJHNlo0l3Wuh12PcMptN5PCkcVEOZLwGJ3RJkUjotckwY 7XW60SlePOnDWHaxpw2vtaiw4gNRNWM+9Qrlimvc2IWJ5puS+0yvC4bLfV98lj/um2ct ukOA== X-Gm-Message-State: APjAAAUcXXbrCCk7daVsNht8qyaoZUJYvzTQI20zCbxAxp2xeALL3rT5 mSKqKv3f9s8uvZbd+gNdTzQx+SpC5ig3a9oaN05Atw== X-Received: by 2002:a05:6830:1249:: with SMTP id s9mr31776344otp.33.1565624337837; Mon, 12 Aug 2019 08:38:57 -0700 (PDT) MIME-Version: 1.0 References: <7dc86e3c-aa3f-905f-3745-01181a3b0dac@linux.intel.com> <20190802153715.GA18075@sinkpad> <20190806032418.GA54717@aaronlu> <20190806171241.GQ2349@hirez.programming.kicks-ass.net> <21933a50-f796-3d28-664c-030cb7c98431@linux.intel.com> <20190808064731.GA5121@aaronlu> <70d1ff90-9be9-7b05-f1ff-e751f266183b@linux.intel.com> <20190810141556.GA73644@aaronlu> In-Reply-To: <20190810141556.GA73644@aaronlu> From: Vineeth Remanan Pillai Date: Mon, 12 Aug 2019 11:38:44 -0400 Message-ID: Subject: Re: [RFC PATCH v3 00/16] Core scheduling v3 To: Aaron Lu Cc: Tim Chen , Peter Zijlstra , Julien Desfossez , "Li, Aubrey" , Aubrey Li , Subhra Mazumdar , Nishanth Aravamudan , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Kees Cook , Greg Kerr , Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini 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 > I have two other small changes that I think are worth sending out. > > The first simplify logic in pick_task() and the 2nd avoid task pick all > over again when max is preempted. I also refined the previous hack patch to > make schedule always happen only for root cfs rq. Please see below for > details, thanks. > I see a potential issue here. With the simplification in pick_task, you might introduce a livelock where the match logic spins for ever. But you avoid that with the patch 2, by removing the loop if a pick preempts max. The potential problem is that, you miss a case where the newly picked task might have a match in the sibling on which max was selected before. By selecting idle, you ignore the potential match. As of now, the potential match check does not really work because, sched_core_find will always return the same task and we do not check the whole core_tree for a next match. This is in my TODO list to have sched_core_find to return the best next match, if match was preempted. But its a bit complex and needs more thought. Third patch looks good to me. Thanks, Vineeth