Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2192278lqt; Mon, 22 Apr 2024 04:26:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFYku7LF0ClN+CJ04XAH8EjsWKfpy6dtWJO/uanAwP0P218Cbs3hhEqKSTdEW6Y5+7CvHl3IMBbSKLgIxNwHw1NzNuaNHRZDF10MDFGg== X-Google-Smtp-Source: AGHT+IHXTdaCHUW0gxKRtI1R4vguplOspU+Sf3TgJHPC1yK58EZDOiyGhoxl/pI1vOu7Fhd67iKM X-Received: by 2002:a17:903:32cd:b0:1e4:3e23:ca72 with SMTP id i13-20020a17090332cd00b001e43e23ca72mr11474972plr.42.1713785173188; Mon, 22 Apr 2024 04:26:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713785173; cv=pass; d=google.com; s=arc-20160816; b=vvWsHAzSFAnp0W6jsWwm0SDUJ19h4reDjoUp4nJKbWoi9+tGoGyyDQjFq+8HECNlyC cErolRQBDcv9CFhbreZDa68vlwLfz4DnTUqa3ZSmU3ArmDh9PKptJ7UgPP5a7ZLL1cv9 ljOgjKBiRM9Aqj6gunUnjjGK0WSK4LLyaCMClKSqiv8Y8fE3usHmuR+EY5C1K2OBojHX FvIKCXQwTyxzzCAQLhXWLgAA72Wixw7MnrtrjSWFE9OkbuxG5if+hRu7r4HfXytMTKKg MKf4yb7RvIvK3yVl1CviJ17AqexCNAI8YGZTSsElJo1h93XaKHRmfHQR7qh7xPfYFlWV sQWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=X7zGnsNLrQuP7nYlXlYVVCmr9CGkehAVy8UcOaw88/8=; fh=v3Ofv0Wb2Tr2z6oVOfSUYjT2JKLxkVZknnmww2Im+50=; b=Lknhmw1c3InUaLiS80vJmgBQKGxvNqZ8T3ySYWIB65UyFWltKNYGuL+dn7YdM5gI5f IaEjwEbZEGd7bPileRWb0rYtjlC4EpyOtbMnsLu9Qe6Rh6ZO9ZLA0wIPBV9OapDZ8Q74 RWpkT5Gds1KsiWVbc8PwZIGGKZTZymYhZQsjdOKx8uS0ynKWL30IBN1NpXySjA8sVQtj tIXZKUgUnvhUY5qUad3CD79PcKqXaRlz0YouJBDyrEL+le3r07nua4OQ3goSIjFXOMIn Uo4xwMOdHHghwGQYBjGuDLPAhk92i58WLAoETKQhmDRncQXvus2JqD2dyWuF99fInjzh usrw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cEdrstWI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bi5-20020a170902bf0500b001e23d04279csi7534146plb.612.2024.04.22.04.26.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 04:26:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cEdrstWI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 22163B22319 for ; Mon, 22 Apr 2024 11:07:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64DFD146018; Mon, 22 Apr 2024 11:07:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cEdrstWI" Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C87014600B for ; Mon, 22 Apr 2024 11:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713784058; cv=none; b=eY/uL9w/mUPGEYSRd8ZGyIjB4bl4VtId1t4m835kQ9xoa7IW9MAdCXHh5MvMnY62BMK1X2u0JkjWDvAYKPRaSqSANrSeqH2NTm8AJf8gkGRAAsG2Ym64zjSt0CFhup8YSzERocUjtiMdUYckKae/eqyAXE5585JmvBTLP7tEvDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713784058; c=relaxed/simple; bh=X7zGnsNLrQuP7nYlXlYVVCmr9CGkehAVy8UcOaw88/8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Cr/BTBTMBitpd2hE/A96DMODC22nRlIuWm87cCpucAToAVhazCTvrT/lG9y4XNeJ1DGd7VakjJfoRzpTAFOylFrFHJ6QOHPD3TVkkC05UNUr7K6ubiycFcAgicBI3UTYXqfXHunUdFX37yq727NIDIPaDVQR+B3oePEw5sVEDzA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cEdrstWI; arc=none smtp.client-ip=209.85.160.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-23319017c4cso2845729fac.2 for ; Mon, 22 Apr 2024 04:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713784056; x=1714388856; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=X7zGnsNLrQuP7nYlXlYVVCmr9CGkehAVy8UcOaw88/8=; b=cEdrstWIq0VDYsFrAYNuMwleYyd9tCDqDS1IZDkxD5I+zPJ2FPZP4RpPaB/Bo/3w/j ek4B3OzkrxkS9ETqsB4tXsGvY3LRoADCRsOEFLoTFetNn9tY5NyvvTd+wZf7XV/3GJfB Y6JtfpDLPYN1aeCD2k+pKMfQUaJJ4N5TV9qpYEW13qEfTR6JfSbz1bj+S6cUDd0eswJQ Yw8Dgm4sC2DYsB2W9ty80yiP5D5mi4NsrZX+SOgvunhFKNdd/qkkczpa01ZhvH+bu0N6 SHY6LvH87P6sni6zlDIxBUE6AU0mcKXbUVNuju8/Gwtz+Uj5E7Iwio0RnxEpccP24OvA Fp7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713784056; x=1714388856; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X7zGnsNLrQuP7nYlXlYVVCmr9CGkehAVy8UcOaw88/8=; b=C8biaXX3YalRXktSIla8YRPn7e9uHJ8HVzELjHAUknChpN4q2XNO2WeJ1aVuz20/Gi koDfXFPwAlIGyNb8i5PEWFYOTOQRLmCElR4gNi/b/nWJDYAsNaALxaKAjz55V8aJ5rPb cecXv6oBm4NoWYTnHYPPFNpY+Pj5FAyyAgowHutL636+yPihRpCb3+ZPlYQjWmtdj3rN Jtw3RC+noyZWFAW2pqDdSOdKoRrc1HamNYHb1+MDBdRq07goovkjK6wJS6ckpBwMIrfn 5k97ygGJKK0ytkA51qUFpgBXgrKId5cffzjjLU088pG9d3qLPwmx/5rKKdtGeUoFwUvb M/wQ== X-Forwarded-Encrypted: i=1; AJvYcCVDVNB7c/BOIbuzLsdXPMX9dNRTb3QDKDwgKZbUWoE7NMZYM6qMgrvkwKCPWlBpPRtaSzNiqjErVFFOPaCTlXIBf+URS58nYiwDteeI X-Gm-Message-State: AOJu0YxizdDqia7SF7By6Xz/TBVW5c1rMUXWGcBQtlbrkQ0kd8q0loM/ 0+kNFoaKU5gA0VHlb3OKUtFMc5GHiz65mcBaAbdbeGKxcrgjvs6q0gBv4zcS9X3X8qPpfWLA7rj NELsPuSjeY+Ff9PKW3WA+7z6ba5Y= X-Received: by 2002:a05:6870:a3d1:b0:22e:dfd0:9a4f with SMTP id h17-20020a056870a3d100b0022edfd09a4fmr12341353oak.24.1713784056423; Mon, 22 Apr 2024 04:07:36 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240422082238.5784-1-xuewen.yan@unisoc.com> <20240422094157.GA34453@noisy.programming.kicks-ass.net> In-Reply-To: <20240422094157.GA34453@noisy.programming.kicks-ass.net> From: Xuewen Yan Date: Mon, 22 Apr 2024 19:07:25 +0800 Message-ID: Subject: Re: [PATCH v2] sched/eevdf: Prevent vlag from going out of bounds when reweight_eevdf To: Peter Zijlstra Cc: Xuewen Yan , mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, yu.c.chen@intel.com, ke.wang@unisoc.com, di.shen@unisoc.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 22, 2024 at 5:42=E2=80=AFPM Peter Zijlstra wrote: > > On Mon, Apr 22, 2024 at 04:33:37PM +0800, Xuewen Yan wrote: > > > On the Android system, the nice value of a task will change very > > frequently. The limit can also be exceeded. > > Maybe the !on_rq case is still necessary. > > So I'm planning to propose another patch for !on_rq case later after > > careful testing locally. > > So the scaling is: vlag =3D vlag * old_Weight / weight > > But given that integer devision is truncating, you could expect repeated > application of such scaling would eventually decrease the vlag instead > of grow it. > > Is there perhaps an invocation of reweight_task() missing? Looking at Is it necessary to add reweight_task in the prio_changed_fair()? > set_load_weight() I'm suspicious of the task_has_idle_policy() case.