Thread (37 messages) 37 messages, 5 authors, 2015-05-14

Re: [PATCH net-next v7 05/24] rocker: support prepare-commit transaction model

From: Jiri Pirko <jiri@resnulli.us>
Date: 2015-05-10 19:20:25

Sun, May 10, 2015 at 06:47:50PM CEST, sfeldma@gmail.com wrote:
From: Scott Feldman <redacted>

For rocker, support prepare-commit transaction model for setting attributes
(and for adding objects).  This requires rocker to preallocate memory
needed for the commit up front in the prepare phase.  Since rtnl_lock is
held between prepare-commit, store the allocated memory on a queue hanging
off of the rocker_port.  Also, in prepare phase, do everything right up to
calling into HW.  The same code paths are tranversed in the driver for both
prepare and commit phases.  In some cases, any state modified in the
prepare phase must be reverted before returning so the commit phase makes
the same decisions.

As a consequence of holding rtnl_lock in process context for all attr sets
(and obj adds), all memory is GFP_KERNEL allocated and we don't need to
busy spin waiting for the device to complete the command.  So the bulk of
this patch is simplifying the memory allocations to only use GFP_KERNEL and
to remove the nowait flag and busy spin loop.

Signed-off-by: Scott Feldman <redacted>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help