Re: [PATCH 02/13] block: Exclude conventional zones when faking max open limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 30, 2024 at 01:04:51PM -0600, Jens Axboe wrote:
> On 4/30/24 9:24 AM, Christoph Hellwig wrote:
> > On Tue, Apr 30, 2024 at 09:51:20PM +0900, Damien Le Moal wrote:
> >> +	/* Resize the zone write plug memory pool if needed. */
> >> +	if (disk->zone_wplugs_pool->min_nr != pool_size)
> >> +		mempool_resize(disk->zone_wplugs_pool, pool_size);
> > 
> > No need for the if here, mempool_resize is a no-op if called for
> > the current value.
> 
> Still cheaper than the function call though, so I think that's
> the right way to do it.

It is only called during device probing and resize.  Try to avoid
the call and spinlock there is the poster definition of premature
micro-optimization..





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux