mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Hungyu Lin <dennylin0707@gmail.com>
Cc: bsingharora@gmail.com, yang.yang29@zte.com.cn,
	wang.yaxin@zte.com.cn, wang.yong12@zte.com.cn, xu.xin@linux.dev,
	jiang.kun2@zte.com.cn, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] delayacct: Preserve delay extrema when aggregating taskstats
Date: Wed, 21 Oct 2026 16:15:06 -0700	[thread overview]
Message-ID: <20261021161506.7baa42839def1312e177243c@linux-foundation.org> (raw)
In-Reply-To: <20261021010022.85881-1-dennylin0707@gmail.com>

On Wed, 21 Oct 2026 01:00:22 +0000 Hungyu Lin <dennylin0707@gmail.com> wrote:

> delayacct_add_tsk() adds each task's statistics to the accumulated TGID
> statistics, but overwrites the delay maxima, minima and peak timestamps.
> Consequently, the last task determines these fields, and a task with no
> recorded delay can erase an earlier task's peak despite a nonzero total.
> 
> Keep the largest maximum and its associated timestamp, and combine the
> minima with min_not_zero() since zero denotes an unrecorded delay. Apply
> this to CPU delay and the seven delay types handled by UPDATE_DELAY().
> Single-task queries still start with zeroed statistics and retain the
> task's values.

Looks good, thanks.

To improve understandability it would be useful to include a getdelays
-d -t before/after example in the changelog.


      parent reply	other threads:[~2026-10-21 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  1:00 Hungyu Lin
2026-10-21 14:54 ` Bradley Morgan
2026-10-21 23:15 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261021161506.7baa42839def1312e177243c@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bsingharora@gmail.com \
    --cc=dennylin0707@gmail.com \
    --cc=jiang.kun2@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wang.yaxin@zte.com.cn \
    --cc=wang.yong12@zte.com.cn \
    --cc=xu.xin@linux.dev \
    --cc=yang.yang29@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®