[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140901.204715.2121922580015092507.davem@davemloft.net>
Date: Mon, 01 Sep 2014 20:47:15 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: sowmini.varadhan@...cle.com
Cc: raghuram.kothakota@...cle.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] sunvnet: Re-check for a VIO_DESC_READY
data descriptor after short udelay()
From: Sowmini Varadhan <sowmini.varadhan@...cle.com>
Date: Fri, 29 Aug 2014 16:18:09 -0400
> @@ -398,6 +398,20 @@ again:
> err = vnet_walk_rx_one(port, dr, start, &ack);
> if (err == -ECONNRESET)
> return err;
> + if (err != 0) {
> + /* The descriptor was not READY. Retry with a
> + * small delay, in case we have a bursty sender
> + * that is actively populating the descriptors, to
> + * reduce the overhead of stopping and re-entering
> + * which would involve expensive LDC messages.
> + */
> + if (retries++ < 3) {
> + udelay(4);
> + goto again;
> + } else {
> + break;
> + }
> + }
I'm definitely not happy with this.
If there were no more packets coming, this is wasted useless polling
time in atomic context.
Everything should be event based, and we should not be compensating
and making sacrifices for a producer slower than we are as a consumer.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists