Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1426686pxu; Sat, 24 Oct 2020 10:17:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydeeDmFZVGq2YxYefJ4piaFUHp+ZYdG2M4iTE1Ue0SictEYz00t+6w7wmXwIxlgUNDma0z X-Received: by 2002:a50:f0c4:: with SMTP id a4mr1632549edm.289.1603559851172; Sat, 24 Oct 2020 10:17:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603559851; cv=none; d=google.com; s=arc-20160816; b=w/EGJeAExKsM1RvorKD0MlI5NmyBXTTfG23LxzN2PY0j1gmgWu49MXlNE8f7/ifw6Z FNKem5sLM79ApQSjGW4Oq6HVZ2tzOqpkqz2j4kW5e6R1eQnftYYOj/Be9g55bbQtu33x W7WKsaFI5Q8fpPhD32MVwkDuhvptW4mUE7SFhcBuCKjPtyjg0gTTT6InrkdXgLI20DF9 uCec+bUi5GbOyo7itdhr8UCCkgq+mDrqbBIUwxR53ht0xdEWl6hniCcYWgWllQ5DeSMm IeplxPcCABFR1My8fpYHOFKTdpgl2XNJ949I5pjE+yuN8gZS3BSY+a0gf5NRVu6aqpWb WIlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=YshX4IZjFRFJAbMvhPuFYrsQnTBTJ7RfpH7w79K038k=; b=uNg1VqdBUeIS+sv7l49IrLZmymJTKax36+4B/8XR2RBynfVB0/Bu6nCmgXuqwoKnxe TCl2Xn2n+eEmxLC0mSStYOyYPHHXClmoRhELYJ4iYqcVeGImEGEbU82FU4ZeCrt0S34f 7dvUWn1dCYd+dUDJ2jXwJr37JO9Aq9epJxt0KMyo6U6K1hYmtGNtOMA9J509NTdqub1w WEmoJxqUUQ8RIECiGLVDDjHhwiFWcvEMQUJ5X1F+AkORC8bEdbWUIE/R66Xtv2BIwZk1 01l5Hp00gc2UX7MBuf6B93Cm66M4IQGUSXjK0GzXKsVEw2ad/QMQuphonchOWdXXLvX+ ZOBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=fPvb9idM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si3541827ejy.718.2020.10.24.10.16.41; Sat, 24 Oct 2020 10:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=fPvb9idM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759542AbgJXLKk (ORCPT + 99 others); Sat, 24 Oct 2020 07:10:40 -0400 Received: from linux.microsoft.com ([13.77.154.182]:41094 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759511AbgJXLKd (ORCPT ); Sat, 24 Oct 2020 07:10:33 -0400 Received: from [192.168.86.179] (c-73-38-52-84.hsd1.vt.comcast.net [73.38.52.84]) by linux.microsoft.com (Postfix) with ESMTPSA id 751AD20B4905; Sat, 24 Oct 2020 04:10:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 751AD20B4905 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1603537832; bh=YshX4IZjFRFJAbMvhPuFYrsQnTBTJ7RfpH7w79K038k=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=fPvb9idMoYeK/5RgEwnQwga2GqzNqXJTqHGWBHV+lQw+FszzF1kWqrEKmDB2XbIAy LcNOzvCsstUfzvwfysS8a8+FboV7d32fLqYwjTrUg4aYjZcw2n/dguTokx8ivdDndq MroJBRBasbElWDMIgXOvqCsfMD4nQtmhpliJdVIM= Subject: Re: [PATCH v8 -tip 02/26] sched: Introduce sched_class::pick_task() To: "Li, Aubrey" , Joel Fernandes Cc: Nishanth Aravamudan , Julien Desfossez , Peter Zijlstra , Tim Chen , Aaron Lu , Aubrey Li , Thomas Glexiner , LKML , Ingo Molnar , Linus Torvalds , Frederic Weisbecker , Kees Cook , Greg Kerr , Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, Dario Faggioli , Paul Turner , Steven Rostedt , Patrick Bellasi , =?UTF-8?B?YmVuYmppYW5nKOiSi+W9qik=?= , Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , Jesse Barnes , "Hyser,Chris" , "Paul E. McKenney" , Tim Chen , "Ning, Hongyu" References: <20201020014336.2076526-1-joel@joelfernandes.org> <20201020014336.2076526-3-joel@joelfernandes.org> <8ea1aa61-4a1c-2687-9f15-1062d37606c7@linux.intel.com> <20201023214702.GA3603399@google.com> From: Vineeth Pillai Message-ID: <4241e5ac-ecdf-8634-fa0d-dd6759e477e1@linux.microsoft.com> Date: Sat, 24 Oct 2020 07:10:26 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Aubrey, On 10/23/20 10:48 PM, Li, Aubrey wrote: > >>>> 2. Do you see the issue in v7? Not much if at all has changed in this >>>> part of the code from v7 -> v8 but could be something in the newer >>>> kernel. >>>> >>> IIRC, I can run uperf successfully on v7. >>> I'm on tip/master 2d3e8c9424c9 (origin/master) "Merge branch 'linus'." >>> Please let me know if this is a problem, or you have a repo I can pull >>> for testing. >> Here is a repo with v8 series on top of v5.9 release: >> https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/log/?h=coresched-v5.9 > I didn't see NULL pointer dereference BUG of this repo, will post performance > data later. There has been a change in tip in pick_next_entity which caused removal of a coresched related change to fix the crash. Could you please try this patch on top of the posted v8 and see if this works? diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 93a3b874077d..4cae5ac48b60 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4428,12 +4428,14 @@ pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr)                         se = second;         } -       if (cfs_rq->next && wakeup_preempt_entity(cfs_rq->next, left) < 1) { +       if (left && cfs_rq->next && +                       wakeup_preempt_entity(cfs_rq->next, left) < 1) {                 /*                  * Someone really wants this to run. If it's not unfair, run it.                  */                 se = cfs_rq->next; -       } else if (cfs_rq->last && wakeup_preempt_entity(cfs_rq->last, left) < 1) { +       } else if (left && cfs_rq->last && +                       wakeup_preempt_entity(cfs_rq->last, left) < 1) {                 /*                  * Prefer last buddy, try to return the CPU to a preempted task. There reason for left being NULL needs to be investigated. This was there from v1 and we did not yet get to it. I shall try to debug later this week. Kindly test this patch and let us know if it fixes the crash. Thanks, Vineeth