Date: Thu, 16 Apr 2015 21:15:08 +0200 From: Gilles Chanteperdrix Message-ID: <20150416191508.GJ1589@hermes.click-hack.org> References: <552faa6bf2d134.92118662@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Xenomai] Rtnet e1000e 82583: slow writel(tx_ring->tail), takes above 1us? List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhoupeng Cc: xenomai On Thu, Apr 16, 2015 at 10:39:59PM +0800, Zhoupeng wrote: > >> This is just MMIO write to 82583, of course MMIO is uncache. > >> And PCIE ASPM is disabled, so L0s is not the problem. > >> > >> I think PCIE Memory Write TLPs is fast enough, but why spend so much time? > > >There is an interesting article that may be relevant to this issue > > > >"PCI Express as a Killer of Software-based Real-Time Ethernet" > > I have read the article carefully. > The author don't mention PCIE ASPM, Latency will be better by disable it. > > Every rt_dev_sendmsg will trigger one writel(tx_ring->tail) in Rtnet. > As the "writel" is time expensive, improvement may be done to Rtnet: > using rtskb to buffer multiple packets, and using one IOCTL to trigger "writel". This optimization increases bandwidth at the expense of latency, exactly the contrary to what RTnet is trying to achieve. So, patch not welcome in fact. Or would be welcome a very careful patch which does sends lone packets immediately, not queue them for sending them later with a timeout or something. -- Gilles.