All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: rtnet-developers@lists.sourceforge.net,
	rtnet-users@lists.sourceforge.net, Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] RTnet in Xenomai 3, status and future
Date: Fri, 21 Nov 2014 12:22:18 +0100	[thread overview]
Message-ID: <546F206A.4060506@web.de> (raw)
In-Reply-To: <20141121111006.GA31011@sisyphus.hd.free.fr>

On 2014-11-21 12:10, Gilles Chanteperdrix wrote:
> On Fri, Nov 21, 2014 at 11:32:30AM +0100, Jan Kiszka wrote:
>> On 2014-11-21 10:08, Gilles Chanteperdrix wrote:
>>> Hi,
>>>
>>> as some of you may have seen, I have sent the pull request to
>>> Philippe for the integration of RTnet in Xenomai 3, those of you who
>>> want will be able to test it when Xenomai 3 next release candidate
>>> is released. What will be in that release candidate is what was in
>>> RTnet git, patched up to adapt it to the Linux and Xenomai API
>>> changes that broke its compilation, and to add the bits and pieces
>>> to be able to run some tests on the hardware I have (namely, the
>>> 8139too, r8169, at91_ether and macb drivers).
>>
>> For x86, support for e1000e and possibly also igb will be very helpful.
>> Those NICs dominate the market now, specifically due to their on-chip /
>> on-board presence. I think those two drives are in better shape than the
>> legacy ones.
> 
> When compiling Xenomai 3 with RTnet on x86 (32 and 64), I enabled
> all the PCI drivers. So, they all compile as far as I know. I have
> not tested them of course, but since the rtnet stack has not changed
> (yet), they should continue to work if they were in a working state.

Ah, ok, perfect.

> 
> 
>>> - the NAPI will be implemented. The NAPI thread will run with the
>>> priority of the highest priority waiting thread, and will call
>>> rt_stack_deliver, in order not to increase the RX latency compared
>>> to the current solution. This will make porting recent drivers easy
>>> and has the additional advantage of irq handlers not creating large
>>> irq masking sections like in the current design, which even borders
>>> priority inversion if the bulk of the received packets is for RTmac
>>> vnics or rtnetproxy.
>>
>> Will be an interesting feature. However, whenever you share a link for
>> RT and non-RT packets, you do have an unavoidable prio-inversion risk.
>> The way to mitigate this is non-RT traffic control.
> 
> This can only made on the sending side (which the solution I propose
> for tx queuing should somewhat achieve, BTW). On the receive side,
> the best we can do is get the NAPI thread to inherit the priority of
> the highest priority waiter, and reschedule as soon as it delivers a
> packet to a thread. So, the NAPI thread should not delay high
> priority tasks not currently waiting for a packet if there is no
> higher priority thread waiting for a packet.
> 
>>
>>>
>>> Maybe the RTnet drivers contain some modifications for low latency
>>> like reducing the TX ring length, but I believe putting these
>>> modifications in the drivers is not a so good idea: 
>>
>> The key modifications that were needed for drivers so far are:
>>  - TX/RX time stamping support
>>  - disabling of IRQ coalescing features for low-latency signaling
>>  - support for pre-mapping rings (to avoid triggering IOMMU paths
>>    during runtime)
> 
> Ok, thanks. Could you point me at a drivers which have these
> modifications? Particularly the third one, because I believe
> mainline has RX/TX time stamping as well, and the NAPI should handle
> the second one.

Regarding time stamping: yes, mainline may have this now. You just need
to check when it happens. The original philosophy was to have that as
close to triggering the TX / receiving an RX event as feasible.

Regarding IRQ coalescing: This is a hardware feature that aims at
optimizing throughput and lowering CPU load. As such, it works against
the goal of lowering individual event latencies. However, maybe such
things are controllable in standard drivers today, just not in a
consistent way.

And regarding premapping: Just look that rt_igb or rt_e1000e. See e.g.
c05d7bbfba. This change is mandatory for RT, at least for dual-domain
setups.

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20141121/2c9fda23/attachment.sig>

  reply	other threads:[~2014-11-21 11:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21  9:08 [Xenomai] RTnet in Xenomai 3, status and future Gilles Chanteperdrix
2014-11-21  9:53 ` Richard Cochran
2014-11-21 21:48   ` Gilles Chanteperdrix
2014-11-21 22:08     ` Richard Cochran
2014-11-22  8:56       ` Gilles Chanteperdrix
2014-11-21 10:32 ` Jan Kiszka
2014-11-21 11:10   ` Gilles Chanteperdrix
2014-11-21 11:22     ` Jan Kiszka [this message]
2014-11-21 14:19       ` Gilles Chanteperdrix
2014-11-21 23:23 ` Jeroen Van den Keybus
2014-11-22  9:17   ` Gilles Chanteperdrix

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=546F206A.4060506@web.de \
    --to=jan.kiszka@web.de \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=rtnet-developers@lists.sourceforge.net \
    --cc=rtnet-users@lists.sourceforge.net \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.