Re: [PATCH] accel/habanalabs: Make use of rhashtable

2023-04-28 Thread Cai Huoqing
On 26 4月 23 19:22:43, Cai Huoqing wrote: > On 26 4月 23 17:28:02, Cai Huoqing wrote: > > Using rhashtable to accelerate the search for userptr by address, > > instead of using a list. > > > > Preferably, the lookup complexity of a hash table is O(1). > > > > This patch will speedup the method > >

Re: [PATCH] accel/habanalabs: Make use of rhashtable

2023-04-26 Thread Cai Huoqing
On 26 4月 23 17:28:02, Cai Huoqing wrote: > Using rhashtable to accelerate the search for userptr by address, > instead of using a list. > > Preferably, the lookup complexity of a hash table is O(1). > > This patch will speedup the method > hl_userptr_is_pinned by rhashtable_lookup_fast. > > Sign

[PATCH] accel/habanalabs: Make use of rhashtable

2023-04-26 Thread Cai Huoqing
Using rhashtable to accelerate the search for userptr by address, instead of using a list. Preferably, the lookup complexity of a hash table is O(1). This patch will speedup the method hl_userptr_is_pinned by rhashtable_lookup_fast. Signed-off-by: Cai Huoqing --- .../habanalabs/common/command_