The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@nvidia.com>
To: "yi.sun" <279644543@qq.com>
Cc: "yury.norov" <yury.norov@gmail.com>, mina86 <mina86@mina86.com>,
	mnazarewicz <mnazarewicz@gmail.com>,
	akpm <akpm@linux-foundation.org>,
	"akinobu.mita" <akinobu.mita@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	tjmercier <tjmercier@google.com>, fvdl <fvdl@google.com>,
	tglx <tglx@kernel.org>, song <song@kernel.org>, hch <hch@lst.de>,
	minchan <minchan@kernel.org>, jstultz <jstultz@google.com>,
	Chancellor <nathan@kernel.org>
Subject: Re: Re: [PATCH v7 2/2] lib: bitmap: optimize bitmap_find_next_zero_area_off()
Date: Sat, 4 Jul 2026 18:03:36 -0400	[thread overview]
Message-ID: <akmDOH66OyEs7tmV@yury> (raw)
In-Reply-To: <tencent_6E5F4978C5E9E0318901745A4337C9D1340A@qq.com>

> This issue was caused by the return value of the function bitmap_find_next_zero_area.
> Previously, the return value could be greater than size; now it has been modified to be equal to size.
> 
> 
> int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num)
> {
>     offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, num, (1 << order) - 1);
>     if (offset > bmp->irq_count)
>         goto err;
> 
> 
> So, what should we do next? 
> Should we make bitmap_find_next_zero_area_off return "size + 1" instead, all for the sake of compatibility? 
> Or should we modify all the places that call bitmap_find_next_zero_area_off (which might be a big project)?
> 

Please resend v7 version returning 'size+1'. The next step would be
fixing the function to return size, together with the callers. It
should be the separate series. Please let me know if you want to take
over.

Thanks,
Yury

      reply	other threads:[~2026-07-04 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22  3:00 [PATCH v7 0/2] Improve the performance of bitmap_find_next_zero_area_off() Yi Sun
2026-06-22  3:00 ` [PATCH v7 1/2] lib: bitmap: add tests for bitmap_find_next_zero_area_off() Yi Sun
2026-06-22 10:05   ` Michał Nazarewicz
2026-06-22 12:39     ` 答复: " 孙毅 (Yi Sun)
2026-06-22  3:00 ` [PATCH v7 2/2] lib: bitmap: optimize bitmap_find_next_zero_area_off() Yi Sun
2026-06-22  9:56   ` Michał Nazarewicz
2026-06-30 20:52   ` Nathan Chancellor
2026-06-30 23:13     ` Yury Norov
2026-07-04  9:12     ` yi.sun
2026-07-04 22:03       ` Yury Norov [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=akmDOH66OyEs7tmV@yury \
    --to=ynorov@nvidia.com \
    --cc=279644543@qq.com \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=fvdl@google.com \
    --cc=hch@lst.de \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mina86@mina86.com \
    --cc=minchan@kernel.org \
    --cc=mnazarewicz@gmail.com \
    --cc=nathan@kernel.org \
    --cc=song@kernel.org \
    --cc=tglx@kernel.org \
    --cc=tjmercier@google.com \
    --cc=yury.norov@gmail.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