Re: [PATCH v5 6/8] mem-pool: fill out functionality

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

 



Jameson Miller <jamill@xxxxxxxxxxxxx> writes:

> +void mem_pool_combine(struct mem_pool *dst, struct mem_pool *src)
> +{
> +	struct mp_block *p;
> +
> +	/* Append the blocks from src to dst */
> +	if (dst->mp_block && src->mp_block) {
> +		/*
> +		 * src and dst have blocks, append
> +		 * blocks from src to dst.
> +		 */
> +		p = dst->mp_block;
> +		while (p->next_block)
> +			p = p->next_block;
> +
> +		p->next_block = src->mp_block;

Just being curious, but does this interact with the "we carve out
only from the first block" done in step 4/8?  The remaining unused
space in the first block in the src pool would be wasted, which may
not be such a big deal and may not even be worth comparing the
available space in two blocks and picking a larger one.  But we do
want to decide _after_ thinking things through nevertheless.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux