在 2018/8/20 下午6:48, Andrea Bolognani 写道:
On Mon, 2018-08-20 at 16:32 +0800, Yi Min Zhao wrote:
> 在 2018/8/16 下午11:03, Andrea Bolognani 写道:
>> I haven't looked into the hash table handling in detail but I
>> wonder if it's really necessary? IIUC you're using it just to
>> mark which uids and fids have been already used by a device,
>> which the PCI address allocation code does by setting bits
>> inside integer variables - having a custom hash table for the
>> same seems like overkill, and from the maintenance point of
>> view it would be great to have the logic for PCI address and
>> zPCI address allocation be similar unless diverging is strictly
>> necessary.
> PCI address set uses array to store pci addresses' assignment. It doesn't
> need too much memory because the buses are allocated dynamically, one
> bus only has 32 slot, and it's a tree topology. But in zpci case, fid
> and uid
> are flat. FID is 32-bit so that we need a 4294967295 sized array.
> Don't you think it's too large?
Welp, I guess you're right. Disregard this comment then.
Thanks for your comment anyway!