public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: "Li,Rongqing" <lirongqing@baidu.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	"huangjunxian6@hisilicon.com" <huangjunxian6@hisilicon.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [????] Re: [PATCH][v2] RDMA/core: Prevent soft lockup during large user memory region cleanup
Date: Wed, 19 Nov 2025 15:06:02 -0400	[thread overview]
Message-ID: <20251119190602.GN17968@ziepe.ca> (raw)
In-Reply-To: <02011baf337649f6997166f223417417@baidu.com>

On Wed, Nov 19, 2025 at 02:03:20AM +0000, Li,Rongqing wrote:
> > > Fix soft lockup issues by incorporating cond_resched() calls within
> > > __ib_umem_release(), and this SG entries are typically grouped in 2MB
> > > chunks on x86_64, adding cond_resched() should has minimal
> > performance
> > > impact.
> > 
> > This is not true, I think this should have been more careful to only resched
> > after larger groupings.. How much slower did you make normal 4k unpins??
> > 
> > Jason
> 
> 
> I don't see this as a issue for several reasons. First, this code
> path is not performance-critical. 

Yes it is!

> Second, the number of cond_resched
> calls added by this modification is identical to what was introduced
> in commit 928da37a229f3444, 

No its not! That loop does entire batches of pages into a PAGE_SIZE
memory buffer, this does it for every single 4k page.

> any problems. Third, as seen in commit 16c610162d1f1c, the
> cond_resched call rate was reduced to once every 16 packets - our
> current frequency remains well below this commit.

I don't know what that has to do with anything here

Jason

  reply	other threads:[~2025-11-19 19:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  9:53 [PATCH][v2] RDMA/core: Prevent soft lockup during large user memory region cleanup lirongqing
2025-11-13 11:27 ` Junxian Huang
2025-11-13 13:35 ` Leon Romanovsky
2025-11-17 17:47 ` Jason Gunthorpe
2025-11-19  2:03   ` [????] " Li,Rongqing
2025-11-19 19:06     ` Jason Gunthorpe [this message]
2025-11-20  3:28       ` [????] " Li,Rongqing
2025-11-21 23:33         ` Jason Gunthorpe

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=20251119190602.GN17968@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=huangjunxian6@hisilicon.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lirongqing@baidu.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