History

mshv: Use kfree_rcu in mshv_portid_free

mshv_portid_free() uses synchronize_rcu() followed by kfree() to reclaim port table entries. This blocks the caller until a full RCU grace period elapses, which is unnecessary since the same module already uses the non-blocking kfree_rcu() pattern in mshv_port_table_fini(). Replace with kfree_rcu() to avoid the blocking wait and keep the reclamation strategy consistent across the file.

Stanislav Kinsburskii committed 3 months ago

Commit 5cb5c2f1 parent a9708e51 file · +1 −2Browse files

Unified · Split

drivers/hv/mshv_portid_table.c+1−2
@@ -62,8 +62,7 @@ mshv_portid_free(int port_id) · 61 unmodified lines
6262 WARN_ON(!info);
6363 idr_unlock(&port_table_idr);
6464
65− synchronize_rcu();
66− kfree(info);
65+ kfree_rcu(info, portbl_rcu);
6766 }
6867
6968 int