Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp674604ybm; Tue, 21 May 2019 01:22:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHexZP+eYHIa9CoXCbQ78c+5SW/CtiaOyWm8iRAGSEp7DVV1INOwTT1w7SnNG0j0xcQOBA X-Received: by 2002:a17:902:6948:: with SMTP id k8mr81755688plt.81.1558426924029; Tue, 21 May 2019 01:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558426924; cv=none; d=google.com; s=arc-20160816; b=QOwWpnqUYKXVJy2ndOn9oTVke31C49fgBZwqT3fl/GAg8NRGhQTYS8jn7vlPQPbTxG R9JoGC2ks83J/AK7NqouRd/ykwoHQhPPaZnnPKz/KqbRhxFzPki2zljH/HmurRqZkI6s 2DRwWV3En6P2tpYJ5qdQ4xSsa8xpalsojPKzt4Szm31rgUz/AIdH1FFPehwn7ofBAV71 ADJ+68Pdz7DykTHqZW31WXExLRWu4PgX6BGuCaPFH31mCYhlp/Y3ge8qz0Yt/zIQfc+u vnG40U1fM7w08rY/zHyiib2EOKF86mIcGcyVOqpG0zZWNkWRRBJVrzP+aqA3LRLm3YAU aqbA== 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=uypbq/FcCnVlqwXjTWT1VO52O+LoVFoRKGGQXigRvgc=; b=d2XoZpv/muRlTNd/+ssj6R3z9blGNE6emJGKqHAyv5H6KboXr93KVENaPMHfC7N000 6MhXBy1hpC60kOIQhRn0NXCkzKQswvWV+4GgAnrga6E7rrKvZiehaJWxZG3AOmcC2IZV nRNEQEybKbhkLnzT2wJQM0mHzxmWdTLGbVLMqhdMHOzE5qpAOS9wWfzmt6WvqapQFnWI opDU3Y37jGsBryN8Kf1fPunOFc0C0VH0U9i+TLbuZCjTwELutpimlInBAI+5vB8FsHTF V9p/8L9ummx6CM4PeG0y8nvbx43p4Hs8BB2cIkOjhs/OujV5CftiQGo3NiQF7yS0Xzzr MHyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HhNep12X; 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 j93si20882636plb.32.2019.05.21.01.21.48; Tue, 21 May 2019 01:22:04 -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=HhNep12X; 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 S1726692AbfEUITP (ORCPT + 99 others); Tue, 21 May 2019 04:19:15 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45170 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfEUITP (ORCPT ); Tue, 21 May 2019 04:19:15 -0400 Received: by mail-lf1-f66.google.com with SMTP id n22so12310156lfe.12 for ; Tue, 21 May 2019 01:19:13 -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=uypbq/FcCnVlqwXjTWT1VO52O+LoVFoRKGGQXigRvgc=; b=HhNep12XcKjILVSX84LR4GhavmMnam7QaFAEowwiZ4PCTmMWbBTNW5qEKQMZniB93+ yiitMPmyQRp1ygqGQfB/I9ki0zpREPrOfbvi/Rj9yc3lJnwAdtYTsbAqHIrnelpnVAdo uDlsoj3BHzFnw8vQy6NlcB8dkY4QXns/SAUKoBu++/F903EYr/A12GSVv4MbraTEdjHd I6KE++i/zb8DaLJRyFkwNKrHKCDoqE3yxx+EZYku+NvAHtyWL3DJqtU32WwUijzplclK MNbehcD51NFgLdjJjvh21Kw+76qtxvT6BEuag1s4jsXqiJIT52FDk5uDhBEOAVeHRSa6 424A== 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=uypbq/FcCnVlqwXjTWT1VO52O+LoVFoRKGGQXigRvgc=; b=LxR1VVMPrDE2wAO+t3NcXmsjZgApa+1gUxeXs1PY4Wf3VrJDitAJBtV+81RW50U0Py a8RMtGg8HNcC9OQRVzbmzTWSl3wCNRAMAzsdEy6ykV5ZZPdG2FH5hvG6JyWKQ+QAQ/tD 4pZRmOLlRx9ZM/+MlPe4QPkKrQAFIDJ3uwBJrSL9Rh5ZxQZYAVKJY6XLgw8TIafq5063 hnYiarlWVm35NjyzWxyPhBlQCeleLQFot3AzaULq2yDwAiaid0AQXdN3u5GuC4sHgmyq K2L6w4B4tlB4z93gv2t/gFvPB/kivxA5XkIE8cdCPxN4otfCrD6wRlYWYO0s3omHXPAX SLyA== X-Gm-Message-State: APjAAAWXJBnN9jl4XfiZaYZXhJh9FMyd2SH4pv8YOUwXEyEtBqiPBlvB 7tTHWp4F+85vixuPDjLC6XPvp+8AcDrlmP6THHA= X-Received: by 2002:a19:c194:: with SMTP id r142mr40248788lff.41.1558426753044; Tue, 21 May 2019 01:19:13 -0700 (PDT) MIME-Version: 1.0 References: <20190520130454.GA677@pauld.bos.csb> In-Reply-To: From: Aubrey Li Date: Tue, 21 May 2019 16:19:00 +0800 Message-ID: Subject: Re: [RFC PATCH v2 13/17] sched: Add core wide task selection and scheduling. To: Vineeth Pillai Cc: Phil Auld , Nishanth Aravamudan , Julien Desfossez , Peter Zijlstra , Tim Chen , Ingo Molnar , Thomas Gleixner , Paul Turner , Linus Torvalds , Linux List Kernel Mailing , Subhra Mazumdar , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Kees Cook , Greg Kerr , Aaron Lu , 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 On Mon, May 20, 2019 at 10:04 PM Vineeth Pillai wrote: > > > > The following patch improved my test cases. > > > Welcome any comments. > > > > > > > This is certainly better than violating the point of the core scheduler :) > > > > If I'm understanding this right what will happen in this case is instead > > of using the idle process selected by the sibling we do the core scheduling > > again. This may start with a newidle_balance which might bring over something > > to run that matches what we want to put on the sibling. If that works then I > > can see this helping. > > > > But I'd be a little concerned that we could end up thrashing. Once we do core > > scheduling again here we'd force the sibling to resched and if we got a different > > result which "helped" him pick idle we'd go around again. Thrashing means more IPIs right? That's not what I observed, because idle task has less chance onto CPU, rescheduling is reduced accordingly. > > I think inherent in the concept of core scheduling (barring a perfectly aligned set > > of jobs) is some extra idle time on siblings. Yeah, I understand and agree with this, but 10-15% idle time on an overloaded system makes me to try to figure out how this could happen and if we can improve it. > > > > > I was also thinking along the same lines. This change basically always > tries to avoid idle and there by constantly interrupting the sibling. > While this change might benefit a very small subset of workloads, it > might introduce thrashing more often. Thrashing is not observed under an overloaded case but may happen under a light load or a mid load case, I need more investigation. > > One other reason you might be seeing performance improvement is > because of the bugs that caused both siblings to go idle even though > there are runnable and compatible threads in the queue. Most of the > issues are fixed based on all the feedback received in v2. We have a > github repo with the pre v3 changes here: > https://github.com/digitalocean/linux-coresched/tree/coresched Okay, thanks, it looks like the core functions pick_next_task() and pick_task() have a lot of changes against v2. Need more brain power.. > > Please try this and see how it compares with the vanilla v2. I think its > time for a v3 now and we shall be posting it soon after some more > testing and benchmarking. Is there any potential change between pre v3 and v3? I prefer working based on v3 so that everyone are on the same page. Thanks, -Aubrey