mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Michal Simek'" <michal.simek@xilinx.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Srikanth Thokala <sthokal@xilinx.com>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	Michal Simek <monstr@monstr.eu>,
	"Anirudha Sarangi" <anirudh@xilinx.com>,
	John Linn <John.Linn@xilinx.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 05/14] net: axienet: Service completion interrupts ASAP
Date: Wed, 12 Feb 2014 16:38:36 +0000	[thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D0F6BDFEE@AcuExch.aculab.com> (raw)
In-Reply-To: <cafb13f2ebe4bb996bafb91e405d8609454bb920.1392220536.git.michal.simek@xilinx.com>

From: Michal Simek
> From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> 
> The packet completion interrupts for TX and RX should be serviced before
> the packets are consumed. This ensures against the degenerate case when a
> new completion interrupt is raised after the handler has exited but before
> the interrupts are cleared. In this case its possible for the ISR to clear
> an unhandled interrupt (leading to potential deadlock).

I would clear the IRQ after processing the last packet, and then do a final
check for another packet.

That reduces the number of interrupts you take and then find there is
no work (because it was done on the previous interrupt).

There is a slight 'gotcha' in that the write to clear the IRQ can easily
get delayed enough the that cpu exits the ISR before the IRQ line
actually drops - leading the unwanted and unclaimed interrupts.
A posted write over PCIe could easily take long enough.

Maybe a hybrid scheme where the IRQ is cleared when the next entry
is still owned by the device would work.

	David




  reply	other threads:[~2014-02-12 16:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 15:55 [PATCH 0/14] Xilinx axi ethernet patches Michal Simek
2014-02-12 15:55 ` [PATCH 01/14] net: axienet: Fix compilation error Michal Simek
2014-02-12 15:55 ` [PATCH 02/14] net: axienet: Fix compilation warnings Michal Simek
2014-02-12 15:55 ` [PATCH 03/14] net: axienet: Support for RGMII Michal Simek
2014-02-12 15:55 ` [PATCH 04/14] net: axienet: Handle 0 packet receive gracefully Michal Simek
2014-02-12 15:55 ` [PATCH 05/14] net: axienet: Service completion interrupts ASAP Michal Simek
2014-02-12 16:38   ` David Laight [this message]
2014-02-12 15:55 ` [PATCH 06/14] net: axienet: Handle jumbo frames for lesser frame sizes Michal Simek
2014-02-12 15:55 ` [PATCH 07/14] net: axienet: Support phy-less mode of operation Michal Simek
2014-02-12 15:55 ` [PATCH 08/14] net: axienet: Removed checkpatch errors/warnings Michal Simek
2014-02-13  0:31   ` Joe Perches
2014-02-13  7:19     ` Michal Simek
2014-02-13 15:51       ` Joe Perches
2014-02-14  9:21         ` Michal Simek
2014-02-12 15:55 ` [PATCH 09/14] net: axienet: Fix comments blocks Michal Simek
2014-02-12 15:55 ` [PATCH 10/14] net: axienet: Use pdev instead of op Michal Simek
2014-02-12 15:55 ` [PATCH 11/14] net: axienet: Use devm_* calls Michal Simek
2014-02-12 15:55 ` [PATCH 12/14] net: axienet: Use of_property_* calls Michal Simek
2014-02-12 15:55 ` [PATCH 13/14] net: axienet: Removed _of_ prefix in probe and remove functions Michal Simek
2014-02-12 15:55 ` [PATCH 14/14] net: axienet: Fix kernel-doc warnings Michal Simek
2014-02-13  0:18 ` [PATCH 0/14] Xilinx axi ethernet patches David Miller
2014-02-13  7:00   ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=063D6719AE5E284EB5DD2968C1650D6D0F6BDFEE@AcuExch.aculab.com \
    --to=david.laight@aculab.com \
    --cc=John.Linn@xilinx.com \
    --cc=anirudh@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=netdev@vger.kernel.org \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=sthokal@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®