Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4530337pxb; Tue, 25 Jan 2022 12:23:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwThhVIKDhNdt8MQJ9KTNsrWOTstRO8iX85OltArWsfkG48WjVwrlrklyzz7YgCOBQaU+AE X-Received: by 2002:a17:90a:7d05:: with SMTP id g5mr5299710pjl.9.1643142226765; Tue, 25 Jan 2022 12:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643142226; cv=none; d=google.com; s=arc-20160816; b=f6G7CqyvykZqOeIXy89eVLOLL77zc8+N+MXtBUoISdNpi6gSxfok6cvxmo/BSciXIm V6InWAiWjfzpjApF1TAuuPFlzKMTraw2Oau8mcnnqQ7B3Zpz/B/1PjncBODFUx46uYKQ X1+7o8+BDRQSp6P49659kzlnllUciNlL7ecAAK6v07LjcePBc1DnP4wefN+mZDV2RXlZ 9pV5L06FJ4ub6Ng1ZTL2KFLddqYFF3urb/Kbvn2+tLJXqEJFoHSE8YENN3yBdQ+nOGxJ kt8T/Bh0R4pgWWP2ID5mXyLqOsrGChPxjonBtwlBUBxUP6eO5XEU0hgbk5z4CgZjHhSd pPVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gtrPmzwuc49PRDcKSoMWbGgV3vDQg/A9aITmSjuzp5c=; b=dQndStW5NjjYAyk2d9Kl14UD5TOZ3qOE1vGT13T/cUva9SV78G2xn3F4FYTdwXuLTA 1nnGLdh97eBzac9jlFqHIIQUwGhpLptdi8yuqTai8QKO0iE2kztxa4SGhXlkUuzAqcOS bajMtcMrFnf30X40nLE+8oKiNQJWillPgErOVsl9mMQY8KzpyrucZECd+CBOUPy+R9zZ YU8pl4sfp3Yj8xN5k/HA1hjpwKW4gCW44/eRPId8ScTHIN2ThgUEAl3KwiTIyZoGOu+1 oa4Jy7cZYK+Fn71jltOCHf3XMoMDT4kl2YHNSdHgQ0YBWvKJfaGbIjW9EG/yyIgJcTzz 1xpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=g1fQpKeN; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id na4si1444200pjb.129.2022.01.25.12.23.32; Tue, 25 Jan 2022 12:23:46 -0800 (PST) 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=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=g1fQpKeN; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388950AbiAYOok (ORCPT + 99 others); Tue, 25 Jan 2022 09:44:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1579870AbiAYOkn (ORCPT ); Tue, 25 Jan 2022 09:40:43 -0500 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E2D6C061781 for ; Tue, 25 Jan 2022 06:40:41 -0800 (PST) Received: by mail-qk1-x733.google.com with SMTP id s12so24709061qkg.6 for ; Tue, 25 Jan 2022 06:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gtrPmzwuc49PRDcKSoMWbGgV3vDQg/A9aITmSjuzp5c=; b=g1fQpKeNAHgn9G8Omr0cljidyKQ3ENNVBrAJmALmgqehDrb40DaX8BQY+PzqLEJeq9 8Ju+pVg6yx3/nYZnsCiCAKOgJpFO/o081p79KVhTcRQvnPfVGP/YOgiFLNt49d8W5kO1 UACjHga4PuMhduxst5D7SG1SwibPnayMnti2RB3KciYWwdVKcemFTgb9ptcd6jMVmT46 HsQjEm6PGHOjarzAf1htN0pDGqxw728n7mhMAHtU1PnquagyK4d9aFCLHTASS7YSFnX/ PTSKGqGAi1nGvMcgALpHVkDsxVp6eLJ17WuWrI59bAFNYAyqjaylr9Sq99tHNG9rY+mH ifpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gtrPmzwuc49PRDcKSoMWbGgV3vDQg/A9aITmSjuzp5c=; b=L46CRVo8NMyYi44F0PWEYl0Jf25pfBwvRa1FV0i6owPKHO1u+I9WLgnrdYm6bhKC9v Tszzf9JE3jLTm2b7Yixe5gISDxiSsDyNBO4NZPmpc4pjmOLJTuqSaPIQJ2C62937yDbh sFnrWuQwaqKeOZO3wsk2y6GbUIaDNXvt/P9GJltzY12ExJRuqTjBu08tRGHthzTUOxaU 7JVIZnRvP+lce3wvw/oV1Rpiige1ArA8ZShofJ3z5AcZY4rbM/LaskN8NQsYCvtrJNk+ 2m3LTwtbQ6SC9iIbGdJ4miPsg4PNpjO1HcXQ26MU8QCZgh1g5C8/AkelKwIrFphRGwNT 2FpA== X-Gm-Message-State: AOAM5303ZwceaGZGQbOwTdEBaHfhQ91cG+BydN0RanxZalRJpPybI9wP dYpFBgqVLENlZhpLeorY8AqiQcS5utmLzA== X-Received: by 2002:a05:620a:56a:: with SMTP id p10mr1893232qkp.102.1643121640735; Tue, 25 Jan 2022 06:40:40 -0800 (PST) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id h10sm9606707qko.90.2022.01.25.06.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 06:40:40 -0800 (PST) Date: Tue, 25 Jan 2022 09:40:39 -0500 From: Johannes Weiner To: Huangzhaoyang Cc: Suren Baghdasaryan , Peter Zijlstra , Zhaoyang Huang , Ingo Molnar , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv4] psi: fix possible trigger missing in the window Message-ID: References: <1643093818-19835-1-git-send-email-huangzhaoyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1643093818-19835-1-git-send-email-huangzhaoyang@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 02:56:58PM +0800, Huangzhaoyang wrote: > From: Zhaoyang Huang > > When a new threshold breaching stall happens after a psi event was > generated and within the window duration, the new event is not > generated because the events are rate-limited to one per window. If > after that no new stall is recorded then the event will not be > generated even after rate-limiting duration has passed. This is > happening because with no new stall, window_update will not be called > even though threshold was previously breached. To fix this, record > threshold breaching occurrence and generate the event once window > duration is passed. > > Suggested-by: Suren Baghdasaryan > Signed-off-by: Zhaoyang Huang Acked-by: Johannes Weiner