lib/hash: setting the maximum reclamation size
Checks
Commit Message
In the previous implementation, the maximum reclamation size was set
to RTE_HASH_RCU_DQ_RECLAIM_MAX and it was not configurable. This patch
uses the configuration argument to set the maximum reclamation size.
Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
Cc: dharmik.thakkar@arm.com
Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Cc: Yipeng Wang <yipeng1.wang@intel.com>
Cc: Sameh Gobriel <sameh.gobriel@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
---
lib/hash/rte_cuckoo_hash.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hello,
Any comment on this patch?
On Wed, Apr 17, 2024 at 4:39 PM Abdullah Ömer Yamaç <aomeryamac@gmail.com>
wrote:
> In the previous implementation, the maximum reclamation size was set
> to RTE_HASH_RCU_DQ_RECLAIM_MAX and it was not configurable. This patch
> uses the configuration argument to set the maximum reclamation size.
>
> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
> Cc: dharmik.thakkar@arm.com
> Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Cc: Yipeng Wang <yipeng1.wang@intel.com>
> Cc: Sameh Gobriel <sameh.gobriel@intel.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>
> Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
>
> Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
> ---
> lib/hash/rte_cuckoo_hash.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
> index 4a44aadd9a..6d80793164 100644
> --- a/lib/hash/rte_cuckoo_hash.c
> +++ b/lib/hash/rte_cuckoo_hash.c
> @@ -1557,6 +1557,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct
> rte_hash_rcu_config *cfg)
> if (params.size == 0)
> params.size = total_entries;
> params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
> + params.max_reclaim_size = cfg->max_reclaim_size;
> if (params.max_reclaim_size == 0)
> params.max_reclaim_size =
> RTE_HASH_RCU_DQ_RECLAIM_MAX;
> params.esize = sizeof(struct __rte_hash_rcu_dq_entry);
> --
> 2.34.1
>
>
Hello,
Is there any comment on this patch?
On Tue, Apr 23, 2024 at 4:51 PM Abdullah Ömer Yamaç <aomeryamac@gmail.com>
wrote:
> Hello,
> Any comment on this patch?
>
> On Wed, Apr 17, 2024 at 4:39 PM Abdullah Ömer Yamaç <aomeryamac@gmail.com>
> wrote:
>
>> In the previous implementation, the maximum reclamation size was set
>> to RTE_HASH_RCU_DQ_RECLAIM_MAX and it was not configurable. This patch
>> uses the configuration argument to set the maximum reclamation size.
>>
>> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
>> Cc: dharmik.thakkar@arm.com
>> Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
>> Cc: Yipeng Wang <yipeng1.wang@intel.com>
>> Cc: Sameh Gobriel <sameh.gobriel@intel.com>
>> Cc: Bruce Richardson <bruce.richardson@intel.com>
>> Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
>>
>> Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
>> ---
>> lib/hash/rte_cuckoo_hash.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
>> index 4a44aadd9a..6d80793164 100644
>> --- a/lib/hash/rte_cuckoo_hash.c
>> +++ b/lib/hash/rte_cuckoo_hash.c
>> @@ -1557,6 +1557,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct
>> rte_hash_rcu_config *cfg)
>> if (params.size == 0)
>> params.size = total_entries;
>> params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
>> + params.max_reclaim_size = cfg->max_reclaim_size;
>> if (params.max_reclaim_size == 0)
>> params.max_reclaim_size =
>> RTE_HASH_RCU_DQ_RECLAIM_MAX;
>> params.esize = sizeof(struct __rte_hash_rcu_dq_entry);
>> --
>> 2.34.1
>>
>>
Hi Abdullah,
Few comments inline
> On Apr 17, 2024, at 8:39 AM, Abdullah Ömer Yamaç <aomeryamac@gmail.com> wrote:
>
> In the previous implementation, the maximum reclamation size was set
> to RTE_HASH_RCU_DQ_RECLAIM_MAX and it was not configurable. This patch
> uses the configuration argument to set the maximum reclamation size.
Nit. This can be as follows:
“Set the maximum reclamation size to user provided value”
>
> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
> Cc: dharmik.thakkar@arm.com
> Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Cc: Yipeng Wang <yipeng1.wang@intel.com>
> Cc: Sameh Gobriel <sameh.gobriel@intel.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>
> Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Please add:
stable@dpdk.org to the Cc list
>
> Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
> ---
> lib/hash/rte_cuckoo_hash.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
> index 4a44aadd9a..6d80793164 100644
> --- a/lib/hash/rte_cuckoo_hash.c
> +++ b/lib/hash/rte_cuckoo_hash.c
> @@ -1557,6 +1557,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
> if (params.size == 0)
> params.size = total_entries;
> params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
> + params.max_reclaim_size = cfg->max_reclaim_size;
> if (params.max_reclaim_size == 0)
> params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX;
> params.esize = sizeof(struct __rte_hash_rcu_dq_entry);
> --
> 2.34.1
>
@@ -1557,6 +1557,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
if (params.size == 0)
params.size = total_entries;
params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
+ params.max_reclaim_size = cfg->max_reclaim_size;
if (params.max_reclaim_size == 0)
params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX;
params.esize = sizeof(struct __rte_hash_rcu_dq_entry);