Skip to contentSkip to conversation

lib/hash: setting the maximum reclamation size

PATCH Superseded Abdullah Ömer Yamaç 3 participants 11 messages Apr 17, 2024 – Jun 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/hash: setting the maximum reclamation size

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 Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 4a44aadd9a..6d80793164 100644
@@ -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);
Signature · 1 line
2.34.1
#1 lore raw

Hello,
Any comment on this patch?

Quoted 35 lines · Abdullah Ömer Yamaç

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 Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 4a44aadd9a..6d80793164 100644
@@ -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

#2 lore raw

Hello,
Is there any comment on this patch?

Quoted 41 lines · Abdullah Ömer Yamaç

Hello,
Any comment on this patch?

Quoted 35 lines · Abdullah Ömer Yamaç

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 Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 4a44aadd9a..6d80793164 100644
@@ -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

#3 lore raw
In reply to Abdullah Ömer Yamaç

Hi Abdullah,
Few comments inline

Quoted 5 lines · Abdullah Ömer Yamaç

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”

Quoted 8 lines
Fixes 769b2de7fb52 ("hash: implement RCU resources reclamation")
Cc Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>

Please add:
[email protected] to the Cc list

Quoted 21 lines

---
lib/hash/rte_cuckoo_hash.c | 1 +

1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 4a44aadd9a..6d80793164 100644
@@ -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);
Signature · 1 line
2.34.1
#4 lore raw

PATCH v2 1/1 lib/hash: Set the maximum reclamation size to user provided value

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 Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 9cf94645f6..f7f0fdfd21 100644
@@ -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);
Signature · 1 line
2.34.1
#5 lore raw

Re: [PATCH v2] lib/hash: Set the maximum reclamation size to user provided value

Hi Abdullah,
I do not see the changes I suggested in this version.

Quoted 34 lines · Abdullah Ömer Yamaç

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 Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>

---
lib/hash/rte_cuckoo_hash.c | 1 +

1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 9cf94645f6..f7f0fdfd21 100644
@@ -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);
Signature · 1 line
2.34.1
#6 lore raw

Re: [PATCH v2] lib/hash: Set the maximum reclamation size to user provided value

Hello,
I saw two comments, and the first one
" Please add:
[email protected] to the Cc list" then I added [email protected] to Cc. Would you like me to add it to the commit?

Second one :
“Set the maximum reclamation size to user provided value” I set this comment to the header. I thought it was more meaningful in the header. If you want also, I can insert it in the description part.

Do I miss something else?

Quoted 41 lines · Honnappa Nagarahalli

Hi Abdullah,
I do not see the changes I suggested in this version.

Quoted 1 line

On May 13, 2024, at 5:00 AM, Abdullah Ömer Yamaç <[email protected]>

lib/hash/rte_cuckoo_hash.c rte_hash_rcu_qsbr_add(struct rte_hash *h, struct

Quoted 23 lines · 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 Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>

---
lib/hash/rte_cuckoo_hash.c | 1 +

1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +0 -0
index 9cf94645f6..f7f0fdfd21 100644
@@ -1557,6 +1557,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct

rte_hash_rcu_config *cfg)

Quoted 10 lines
lib/hash/rte_cuckoo_hash.c +1 -1
 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

#7 lore raw

Re: [PATCH v2] lib/hash: Set the maximum reclamation size to user provided value

Quoted 8 lines · Abdullah Ömer Yamaç

Hello,
I saw two comments, and the first one
" Please add:
[email protected] to the Cc list" then I added [email protected] to Cc. Would you like me to add it to the commit?

I thought it needs to be added to the commit message as per contributing guidelines [1].

[1] https://doc.dpdk.org/guides/contributing/patches.html#patch-for-stable-releases

Quoted 3 lines

Second one :
“Set the maximum reclamation size to user provided value” I set this comment to the header. I thought it was more meaningful in the header. If you want also, I can insert it in the description part.

I meant that we should simplify the long commit message.

Quoted 43 lines

Do I miss something else?

On Mon, May 13, 2024 at 5:34 PM Honnappa Nagarahalli <[email protected]> wrote:
Hi Abdullah,
I do not see the changes I suggested in this version.

Quoted 34 lines · Abdullah Ömer Yamaç

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 Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>

---
lib/hash/rte_cuckoo_hash.c | 1 +

1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 9cf94645f6..f7f0fdfd21 100644
@@ -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);
Signature · 1 line
2.34.1
#8 lore raw

PATCH v3 1/1 lib/hash: setting the maximum reclamation size

Set the maximum reclamation size to user provided value

Fixes 769b2de7fb52 ("hash: implement RCU resources reclamation")
Cc Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 9cf94645f6..f7f0fdfd21 100644
@@ -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);
Signature · 1 line
2.34.1
Reviewed-by on v3 1/1
#9 lore raw
Quoted 15 lines · Abdullah Ömer Yamaç

Set the maximum reclamation size to user provided value

Fixes 769b2de7fb52 ("hash: implement RCU resources reclamation")
Cc Honnappa Nagarahalli <[email protected]>
Cc Yipeng Wang <[email protected]>
Cc Sameh Gobriel <[email protected]>
Cc Bruce Richardson <[email protected]>
Cc Vladimir Medvedkin <[email protected]>
Quoted 1 line
Quoted 19 lines

---
lib/hash/rte_cuckoo_hash.c | 1 +

1 file changed, 1 insertion(+)
lib/hash/rte_cuckoo_hash.c +1 -0
index 9cf94645f6..f7f0fdfd21 100644
@@ -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);
Signature · 1 line
2.34.1