linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Chengming Zhou <zhouchengming@bytedance.com>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, duanxiongchun@bytedance.com,
	songmuchun@bytedance.com
Subject: Re: [PATCH] blk-iocos: fix inuse clamp when iocg deactivate or free
Date: Mon, 16 May 2022 08:37:08 -1000	[thread overview]
Message-ID: <YoKZ1BnPjqYIUW1k@slm.duckdns.org> (raw)
In-Reply-To: <20220516101909.99768-1-zhouchengming@bytedance.com>

On Mon, May 16, 2022 at 06:19:09PM +0800, Chengming Zhou wrote:
> For an active leaf node, its inuse shouldn't be zero or exceed
> its active, but it's not true when deactivate idle iocg or delete
> iocg in ioc_pd_free().
> 
> Although inuse of 1 is very small, it could cause noticeable hwi
> decrease in the long running server. So we'd better fix it.
> 
> And check iocg->child_active_sum is enough for inner iocg, remove
> the needless list_empty check by the way.

Hey, so, I'm not a fan of these "I read code a bit and thought this could be
changed here and there" patches. There's no theme, overarching direction, or
comprehensive view of the structure. The suggested changes can often be
really subtle, which is likely why it may not seem immediately intuitive on
the first look and triggered the submitter to write up the patch. There's no
practical gain from these changes while there's substantical risk of subtle
breakages.

Here, setting inuse to 1 would cause divide by one in the donation logic and
there are comments about the in the code too. So, nack on the patch, and
plase reconsider your approach to sending patches. The current approach
costs more than helps.

Thanks.

-- 
tejun

      parent reply	other threads:[~2022-05-16 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 10:19 [PATCH] blk-iocos: fix inuse clamp when iocg deactivate or free Chengming Zhou
2022-05-16 12:18 ` Chengming Zhou
2022-05-16 17:40   ` Jens Axboe
2022-05-16 18:37 ` Tejun Heo [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=YoKZ1BnPjqYIUW1k@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=duanxiongchun@bytedance.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=songmuchun@bytedance.com \
    --cc=zhouchengming@bytedance.com \
    /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;
as well as URLs for NNTP newsgroup(s).