linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] net: ipa: don't disable NAPI in suspend
@ 2021-01-29 20:20 Alex Elder
  2021-01-29 20:20 ` [PATCH net-next 1/9] net: ipa: don't thaw channel if error starting Alex Elder
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Alex Elder @ 2021-01-29 20:20 UTC (permalink / raw)
  To: davem, kuba
  Cc: elder, evgreen, bjorn.andersson, cpratapa, subashab, netdev,
	linux-kernel

A few weeks ago I suggested a change that added a flag to determine
whether NAPI should be re-enabled on a channel when we're done
polling.  That change was questioned, and upon further investigation
I realized the IPA suspend path was "doing it wrong."

Currently (for newer hardware) the IPA driver suspends channels by
issuing a STOP command.  Part of the stop processing includes a
"freeze" operation, which quiesces activity, disables the I/O
completion interrupt, and disables NAPI.  But disabling NAPI is
only meant to be done when shutting down the channel; there is
no need to disable it when a channel is being stopped for suspend.

This series reworks the way channels are stopped, with the end
result being that neither NAPI nor the I/O completion interrupt is
disabled when a channel is suspended.

The first patch fixes an error handling bug in the channel starting
path.  The second patch creates a helper function to encpasulate
retrying channel stop commands.  The third also creates helper
functions, but in doing so it makes channel stop and start handling
be consistent for both "regular" stop and suspend.

The fourth patch open-codes the freeze and thaw functions as a first
step toward reworking what they do (reordering and eliminating steps).

The fifth patch makes the I/O completion interrupt get disabled
*after* a channel is stopped.  This eliminates a small race in which
the interrupt condition could occur between disabling the interrupt
and stopping the channel.  Once stopped, the channel will generate
no more I/O completion interrupts.

The sixth and seventh patches arrange for the completion interrupt
to be disabled only stopping a channel "for good", not when
suspending.  (The sixth patch just makes a small step to facilitate
review; these two could be squashed together.)

The 8th patch ensures a TX request--if initiated just before
stopping the TX queue--is included when determining whether a
a channel is quiesced for stop or suspend.

And finally the last patch implements the ultimate objective,
disabling NAPI *only* when "really" stopping a channel (not for
suspend).  Instead of disabling NAPI, a call to napi_synchronize()
ensures everything's done before we suspend.

					-Alex

Alex Elder (9):
  net: ipa: don't thaw channel if error starting
  net: ipa: introduce gsi_channel_stop_retry()
  net: ipa: introduce __gsi_channel_start()
  net: ipa: kill gsi_channel_freeze() and gsi_channel_thaw()
  net: ipa: disable IEOB interrupt after channel stop
  net: ipa: move completion interrupt enable/disable
  net: ipa: don't disable IEOB interrupt during suspend
  net: ipa: expand last transaction check
  net: ipa: don't disable NAPI in suspend

 drivers/net/ipa/gsi.c | 137 ++++++++++++++++++++++++++----------------
 1 file changed, 85 insertions(+), 52 deletions(-)

-- 
2.27.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-02-01 18:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 20:20 [PATCH net-next 0/9] net: ipa: don't disable NAPI in suspend Alex Elder
2021-01-29 20:20 ` [PATCH net-next 1/9] net: ipa: don't thaw channel if error starting Alex Elder
2021-01-29 20:20 ` [PATCH net-next 2/9] net: ipa: introduce gsi_channel_stop_retry() Alex Elder
2021-01-29 20:20 ` [PATCH net-next 3/9] net: ipa: introduce __gsi_channel_start() Alex Elder
2021-01-29 20:20 ` [PATCH net-next 4/9] net: ipa: kill gsi_channel_freeze() and gsi_channel_thaw() Alex Elder
2021-01-29 20:20 ` [PATCH net-next 5/9] net: ipa: disable IEOB interrupt after channel stop Alex Elder
2021-01-29 20:20 ` [PATCH net-next 6/9] net: ipa: move completion interrupt enable/disable Alex Elder
2021-01-29 20:20 ` [PATCH net-next 7/9] net: ipa: don't disable IEOB interrupt during suspend Alex Elder
2021-01-29 20:20 ` [PATCH net-next 8/9] net: ipa: expand last transaction check Alex Elder
2021-01-29 20:20 ` [PATCH net-next 9/9] net: ipa: don't disable NAPI in suspend Alex Elder
2021-01-30 15:25   ` Willem de Bruijn
2021-01-30 19:22     ` Jakub Kicinski
2021-01-31  4:30       ` Alex Elder
2021-01-31  4:29     ` Alex Elder
2021-01-31 14:52       ` Willem de Bruijn
2021-01-31 15:32         ` Alex Elder
2021-02-01  1:36           ` Willem de Bruijn
2021-02-01 14:35             ` Alex Elder
2021-02-01 14:47               ` Willem de Bruijn
2021-02-01 15:48                 ` Alex Elder
2021-02-01 18:38                 ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).