lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 21 May 2014 14:49:28 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Cong Wang <cwang@...pensource.com>
Cc:	netdev <netdev@...r.kernel.org>, David Miller <davem@...emloft.net>
Subject: Re: [RFC PATCH] net: Provide linear backoff mechanism for
 constrained resources at the driver

On Wed, May 21, 2014 at 11:05:28AM -0700, Cong Wang wrote:
> On Thu, May 8, 2014 at 12:29 PM, Neil Horman <nhorman@...driver.com> wrote:
> > What about something like this?  Its not even compile tested, but let me know
> > what you think of the idea.  The reasoning behind it is that transient resources
> > like dma address ranges in the iommu or swiotlb have the following attributes
> >
> > 1) they are quickly allocated and freed
> >
> > 2) Usually handled by simply trying again at some later point in time
> >
> > 3) Likely to fail again if tried again immediately.
> >
> > 4) Not condusive to interlocked signaling mechanisms as the time it takes to
> > find and signal a waiting tx queue that resources are now available may take
> > longer than needed, and may still result in failure, as competing allocators
> > may race in and claim said resources during the signaling period.
> >
> > As such, what if we try something more simple like a linear backoff? In this
> > example we add a TX return code that indicates that the driver is not busy, but
> > unable to transmit due to resource constraints.  This signals the qdisc layer to
> > skip trying to drain this transmit queue for a short period of time, with
> > subsequent simmilar errors causing increased backoff.  Once the condition is
> > cleared, the backoff delay is removed and operation returns to normal.
> 
> Loos like this is a more general issue which should be solved for every
> spinlock:
> 
> http://thread.gmane.org/gmane.linux.kernel/1437186
> 
Good point, though this isn't a locking situation so much as a failed
transmission situation.  The same mechanism applies though, and this seems to be
simmilar to what the ticketed spinlocks do
Neil

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ