Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp617755rdb; Fri, 6 Oct 2023 13:15:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZbwSNbuIhiJZwgHe4cfFdPvuFKsAlmPzUhX5/N0WVYW2WGqFctxOklZJHfiOBT0nogyA5 X-Received: by 2002:a05:6a20:a125:b0:161:b5f9:e78d with SMTP id q37-20020a056a20a12500b00161b5f9e78dmr7504052pzk.23.1696623349383; Fri, 06 Oct 2023 13:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696623349; cv=none; d=google.com; s=arc-20160816; b=GfT8HK2duZtgMqOHi42psM7ylK6ZsUJgNX04SP959ecIRsDYd2fCXNmlV/clCgw7OY 29qY0Cqm9knkVV8MeUS5X8UqM6sEC6FafXQPwlLpZO3juGSzpkQT2NJvClzomBfE95+x YaXIPzqgRSUlWdNKEoIOq/WAuOudEZy9LFKdz6g2RY4iBmAIv9n6O0LmHIv50uWPecvR RVOVa7Jjm/cQn5pFmr+/KsjKJKxpb3jS3IoQvT3uuH6Ip1bwVue4YynXyf+xRzZhHt47 x/YA27/UbmaKUkohvtkdgx34bsvx864zy2eTqQNKUf6qiWYdsCMLovEW0/WAd8jzzIS6 AA+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=6zBqI2ZSiH14E7wKQqIifsZ8uCMUdIs3KFK3jYCirhw=; fh=+WJwfCkwyouHCsfShkWeUocnj2omKWUm2zp3b9YhFAY=; b=r2z82mvsVg6VsMddrWoV1JXHdvdNWjNPSa2aN0pv32VbwZL9IDGW+OTJR5PT8a3wrR yPZeL6VZRZ5M8gH19QtXUTowiQ8EskmwsNs6TjKItpJE8itGf5G1CbOoE6kEe9Mg8J9p 39mXu0g6L+4EO9JS5WrI9hg6Py60IpcZqvz/qxAdY8CKryBMq7aTblvpNI/Ttqm66LNd 39Z1RbhkOcMnXZRvtpfCqJjHr9Zc5diHVWUBVtqmh/7vBpZUx9ubHIx05LVyVpjVg+Vx dTIaREeXxIJhWTKjMkLDybtPwLuADk9sp0pZbomor0FkRHJDw847a/KfYhAithfV5Q+Q c7eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=EgLihhjs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id a62-20020a639041000000b00565335587absi4369008pge.802.2023.10.06.13.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 13:15:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=EgLihhjs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id AA46280B8F5A; Fri, 6 Oct 2023 13:15:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233408AbjJFUPd (ORCPT + 99 others); Fri, 6 Oct 2023 16:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233368AbjJFUPb (ORCPT ); Fri, 6 Oct 2023 16:15:31 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B06C9BF for ; Fri, 6 Oct 2023 13:15:29 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20231006201516euoutp0169f02b89b10c15b55e14ad8cb16b59c3~LnervTlek1707617076euoutp01H for ; Fri, 6 Oct 2023 20:15:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20231006201516euoutp0169f02b89b10c15b55e14ad8cb16b59c3~LnervTlek1707617076euoutp01H DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1696623317; bh=6zBqI2ZSiH14E7wKQqIifsZ8uCMUdIs3KFK3jYCirhw=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=EgLihhjs3Ve/g0CwnL4IfgpbIaGqfoDRL/vpjGvW4DttM/1qVAqBR7ylPSyeYeKF2 foKNDV84EshsP8dhKkr5Ggji5SNNrrGSv+zjX4IZVB8IuTjMIuezWnNzn+MZfd3Gza /386XCB71jW67sV97ZA6Fk7iv1C6Mz98w1pPV4W8= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20231006201516eucas1p10086c38098d8dd24832c2497e9c34077~LnerO1Pt00416604166eucas1p11; Fri, 6 Oct 2023 20:15:16 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 51.8F.42423.4DA60256; Fri, 6 Oct 2023 21:15:16 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20231006201515eucas1p1660e31608dcc3be8f3157ded979ecb77~LneqsqR4L0331503315eucas1p1j; Fri, 6 Oct 2023 20:15:15 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231006201515eusmtrp2f3ffcc3628bc5230773a544aec76b285~Lneqrpy-v1887118871eusmtrp2H; Fri, 6 Oct 2023 20:15:15 +0000 (GMT) X-AuditID: cbfec7f2-a51ff7000002a5b7-c7-65206ad4df32 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 36.6F.10549.3DA60256; Fri, 6 Oct 2023 21:15:15 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231006201514eusmtip2cb54bd23a8e9e3f92b601c9a14bac23a~LnepYUJT61358713587eusmtip2y; Fri, 6 Oct 2023 20:15:14 +0000 (GMT) Message-ID: Date: Fri, 6 Oct 2023 22:15:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] sched/fair: fix pick_eevdf to always find the correct se Content-Language: en-US To: Peter Zijlstra , Mike Galbraith Cc: Biju Das , "bsegall@google.com" , "bristot@redhat.com" , "chris.hyser@oracle.com" , "corbet@lwn.net" , "dietmar.eggemann@arm.com" , "gregkh@linuxfoundation.org" , "joel@joelfernandes.org" , "joshdon@google.com" , "juri.lelli@redhat.com" , "kprateek.nayak@amd.com" , "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "patrick.bellasi@matbug.net" , Pavel Machek , "pjt@google.com" , "qperret@google.com" , "qyousef@layalina.io" , "rostedt@goodmis.org" , "tglx@linutronix.de" , "tim.c.chen@linux.intel.com" , "timj@gnu.org" , "vincent.guittot@linaro.org" , "youssefesmat@chromium.org" , "yu.c.chen@intel.com" , "mgorman@suse.de" , "linux-renesas-soc@vger.kernel.org" From: Marek Szyprowski In-Reply-To: <20231006192445.GE743@noisy.programming.kic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zXn3UO8TIxMF4iFGCg1lJhDe9QSZV iDclsbIqtSg/vqg0J7X4EKMpMDAmMkuJJucDU2ZeSbyhmYGpoYmZpYGppZmxkjivZ0FHopBA emJJanZqakFqEUwfEwenVANTsOeudwbH977Ye9f384/KXw9PXX56aYt49dyC8rhI1ycrY2L5 S/b8+CJQKvn7XN89d9F/V2/53b25TmBSY4VZTuTiDZInE6T3fnr+r+HzxmU95X9VSjpyedul jQseFwqcmh0dt7925aw3oYGpOdNOvwmT3Xqd/+rmBVVzZ4fM+LSNy2G9USRn17pv+flWks/3 Op56rX5G+fL+vhaND73Ld8vwvubeEh34L6bE+9iKP7uT6pzyPpwTjLzHNveCVOvKvs82p0sZ mVYISWSXN3x/e/Z//wFjVeV/zVdMZq9o6dthIpx4bqP013+ntL4d0OqPO2kmaOS5Wjd3QmWM c7SoTecCdX8+O3uj0klX9EO3KbEUZyQaajEXFScCAMnwWdDhAwAA X-CMS-MailID: 20231006201515eucas1p1660e31608dcc3be8f3157ded979ecb77 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20231005150845eucas1p1ed3aae6b90c411b5c26a5dfadf7e0733 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231005150845eucas1p1ed3aae6b90c411b5c26a5dfadf7e0733 References: <20231005150258.GA36277@noisy.programming.kicks-ass.net> <553e2ee4-ab3a-4635-a74f-0ba4cc03f3f9@samsung.com> <867f5121d7d010cacf938c293f862b0cea560ec2.camel@gmx.de> <20231006140042.GG36277@noisy.programming.kicks-ass.net> <20231006155501.GH36277@noisy.programming.kicks-ass.net> <20231006192445.GE743@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 13:15:46 -0700 (PDT) X-Spam-Level: ** On 06.10.2023 21:24, Peter Zijlstra wrote: > On Fri, Oct 06, 2023 at 05:55:01PM +0200, Peter Zijlstra wrote: >> And yeah, min_deadline is hosed somehow. >> >> migration/28-185 [028] d..2. 70.264274: validate_cfs_rq: --- / >> migration/28-185 [028] d..2. 70.264277: __print_se: ffff88845cf48080 w: 1024 ve: -58857638 lag: 870381 vd: -55861854 vmd: -66302085 E (11372/tr) >> migration/28-185 [028] d..2. 70.264280: __print_se: ffff88810d165800 w: 25 ve: -80323686 lag: 22336429 vd: -41496434 vmd: -66302085 E (-1//autogroup-31) >> migration/28-185 [028] d..2. 70.264282: __print_se: ffff888108379000 w: 25 ve: 0 lag: -57987257 vd: 114632828 vmd: 114632828 N (-1//autogroup-33) >> migration/28-185 [028] d..2. 70.264283: validate_cfs_rq: min_deadline: -55861854 avg_vruntime: -62278313462 / 1074 = -57987256 >> >> I need to go make dinner (kids hungry), but I'll see if I can figure out >> how this happens... > *sigh*, does the below help? It looks that this fixed the issue. At least I was no longer able to reproduce it. Feel free to add: Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski > --- > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 04fbcbda97d5..6a670f119efa 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -3632,6 +3747,7 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, > */ > deadline = div_s64(deadline * old_weight, weight); > se->deadline = se->vruntime + deadline; > + min_deadline_cb_propagate(&se->run_node, NULL); > } > > #ifdef CONFIG_SMP > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland