You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
net/rds: serialize up+down-work to relax strict ordering
Serialize calls to rds_connect_worker() and rds_shutdown_worker()
by taking advantage of the workqueue-API only executing a single
running callback per "struct work_struct":
We simply en-queue a combined rds_up_or_down_worker(),
that calls either rds_shutdown_worker() or rds_connect_worker()
depending on the state of "RDS_SHUTDOWN_WORK_QUEUED" or
"RDS_RECONNECT_PENDING".
Ideally, we wouldn't have such a mess and complexity to
deal with state transitions, but rather have a proper
state-machine with trigger- and action-definitions,
all dispatched by a single worker:
That way we'd know that parallelism was taken care of
properly, and would also be able to understand
which events in a given context lead to what actions.
But this commit doesn't aim at rewriting all of this,
but rather kick the can down the road by simply
combining up+down-work to avoid race conditions
and allow "cp->cp_wq" to no longer be strictly ordered.
For that we introduce module parameter "rds_wq_strictly_ordered",
which is "true" by default, until we convince ourselves,
that all race-conditions in the code triggered by no
longer using strictly-ordered workqueues are taken care of.
Orabug: 35094723
Signed-off-by: Gerd Rausch <[email protected]>
Reviewed-by: Håkon Bugge <[email protected]>
Signed-off-by: Brian Maly <[email protected]>
0 commit comments