All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Marc Strämke" <marc.straemke@eltropuls.de>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] rtnet locking/socket SKBs
Date: Thu, 4 Jun 2015 16:07:11 +0200	[thread overview]
Message-ID: <20150604140711.GZ27570@hermes.click-hack.org> (raw)
In-Reply-To: <2202092.SxJm6YhEYp@eltrolinux48.eltroad.eltropuls>

On Thu, Jun 04, 2015 at 02:35:18PM +0200, Marc Strämke wrote:
> Am Donnerstag, 4. Juni 2015, 13:31:00 schrieb Gilles Chanteperdrix:
> > On Thu, Jun 04, 2015 at 01:09:08PM +0200, Marc Strämke wrote:
> > > 
> > > Yes I do understand this. I am just trying to figure out what the right
> > > fix is. If I just disable incrementing the fd reference count (see
> > > attached patch) AF_PACKET works as it should.  From my current
> > > understanding of the code the reference counting for the SKB Pools
> > > attached to a socket is redundant, but I've only closely inspected
> > > AF_PACKET not the other sockets in the IP stack.
> > The locking of the pools is not redundant. The reason for this lock
> > is that when an skb is in between two pools, we do not want the pool
> > it comes from to be destroyed, as the skb would end-up leaking. So,
> Yes, that is obvious. But what these lock ops do is not locking for the 
> transient moment when the packet is moving between pools but for the time the 
> packet is in a pool. This locking ops insure that no whole skb pool is leaked.
> 
> If I look at rtskb_module_lock_ops this makes sense to me, one cannot unload 
> the module till all pools are empty. It left me wondering though if 
> try_module_get is safe to be called from a realtime context..

try_module_get is safe to be called from realtime context, starting
with the I-pipe patch for Linux 3.14.

-- 
					    Gilles.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20150604/1416b9b0/attachment.sig>

  parent reply	other threads:[~2015-06-04 14:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 12:56 [Xenomai] Problem with RTNET Packet Socket (or RTDM in general) in Xenomai 3 Marc Strämke
2015-06-03 13:02 ` Gilles Chanteperdrix
2015-06-03 17:09   ` Marc Strämke
2015-06-04 10:41     ` [Xenomai] rtnet locking/socket SKBs Marc Strämke
2015-06-04 10:56       ` Gilles Chanteperdrix
2015-06-04 11:09         ` Marc Strämke
2015-06-04 11:12           ` [Xenomai] [PATCH] Proof of concept: disable locking in af_packet skb pool Marc Strämke
2015-06-04 14:15             ` Gilles Chanteperdrix
2015-06-04 11:20           ` [Xenomai] rtnet locking/socket SKBs Gilles Chanteperdrix
2015-06-04 11:31           ` Gilles Chanteperdrix
2015-06-04 12:35             ` Marc Strämke
2015-06-04 12:37               ` Gilles Chanteperdrix
2015-06-04 12:40                 ` Marc Strämke
2015-06-04 14:07               ` Gilles Chanteperdrix [this message]
2015-09-27 21:32       ` Gilles Chanteperdrix
2015-09-29 21:59         ` Gilles Chanteperdrix
2015-09-30 14:33           ` Marc Strämke
2015-09-30 14:41             ` Gilles Chanteperdrix
2015-09-30 14:44               ` Marc Strämke

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=20150604140711.GZ27570@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=marc.straemke@eltropuls.de \
    --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.