Search Linux Wireless

Re: [PATCH v5 07/12] wifi: ath12k: Cache vdev configs before vdev create

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

 



On 3/25/2024 10:49 AM, Rameshkumar Sundaram wrote:
> On 3/22/2024 2:34 AM, Jeff Johnson wrote:
>> On 3/20/2024 12:09 PM, Rameshkumar Sundaram wrote:
>>> +	struct ath12k_vif_cache cache;
>>
>> in my v4 comment I had suggested that this cache be a pointer.
>> instead you chose to add pointers to the subordinate records within the cache.
>> why take that approach?
>>
> Thought of making the actual cache objects as pointers, instead of 
> allocating memory for all type(key,tx) of caches during vdev create itself.
> So that well allocate required cache alone if needed. Thoughts ?

There is a tradeoff here.

This cache is temporary, but the allocation exists for the lifetime of the
struct. So by having a single pointer here you only waste one pointer, but at
the expense that for each object type you have to see if the cache is already
present, and if not, then allocate the cache.

I'm OK either way, but just wanted to point out that the current approach
wastes more memory when the cache isn't needed.

/jeff




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux