All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Sven Schuchmann <schuchmann@schleissheimer.de>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: Re: AW: AW: AW: [PATCH] can: isotp: omit unintended hrtimer restart on socket release
Date: Mon, 30 Aug 2021 14:44:39 +0200	[thread overview]
Message-ID: <6f9a3a93-fa0e-f039-6332-5ac0d4064731@hartkopp.net> (raw)
In-Reply-To: <DB8P190MB0634D4408A4A57A74134E698D9CB9@DB8P190MB0634.EURP190.PROD.OUTLOOK.COM>

Hi Sven,

On 30.08.21 09:55, Sven Schuchmann wrote:

>> but if I compare the candumps I can see:
>> with the patch:
>>
>>   (000.000008)  vcan0  714   [8]  2F 01 01 01 01 01 01 01
>>   (000.000209)  vcan0  77E   [8]  30 0F 00 AA AA AA AA AA
>>   (000.000061)  vcan0  714   [8]  20 01 01 01 01 01 01 01
>>
>> and without:
>>
>>   (000.000004)  vcan0  714   [8]  2F 01 01 01 01 01 01 01
>>   (000.000069)  vcan0  77E   [8]  30 0F 00 AA AA AA AA AA
>>   (000.000017)  vcan0  714   [8]  20 01 01 01 01 01 01 01
>>
>> sorry, I missed that: Over here the delay seems to be in
>> the FC and not in the CF after the FC. This is what is
>> different compared to the real hardware.
>>
>> So to me it seems that the rcu implementation
>> has changed on the way from 5.10 to 5.14?
> 
> Just checked with a 5.14.0-rc6 which contains the patch, same result:
> 
>     93 / curr:  143 / min:  129 / max:  200 / avg:  156.2
>     94 / curr:  144 / min:  129 / max:  200 / avg:  156.0
>     95 / curr:  141 / min:  129 / max:  200 / avg:  155.9
>     96 / curr:  171 / min:  129 / max:  200 / avg:  156.0
>     97 / curr:  138 / min:  129 / max:  200 / avg:  155.8
>     98 / curr:  137 / min:  129 / max:  200 / avg:  155.6
> 
>   (000.000011)  vcan0  714   [8]  2B 01 01 01 01 01 01 01
>   (000.000193)  vcan0  77E   [8]  30 0F 00 AA AA AA AA AA
>   (000.000037)  vcan0  714   [8]  2C 01 01 01 01 01 01 01
> 
> So maybe there is something wrong on the rpi?

I see a similar difference on my i7-8650U system:

"5" without and "65" with the patch.

The problem remains to be the added time that is now introduced at 
socket close time with the rcu_synchronize().

In your script you are waiting for isotprecv process to finally end with:

	wait $rxpid

And that's the expectable effect ...

It looks like the script works fine without the 'wait' code (which does 
not wait for the process removal then).

@mkl: I assume we have to live with that increased time at socket close 
for security reasons, right?

Best regards,
Oliver

ps. Btw IMO a C program is still the better approach here. 
isotp[send|recv] open/close the sockets for each PDU in the given setup :-/

      reply	other threads:[~2021-08-30 12:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 17:37 [PATCH] can: isotp: omit unintended hrtimer restart on socket release Oliver Hartkopp
2021-06-19 21:36 ` Marc Kleine-Budde
2021-08-28 13:20 ` AW: " Sven Schuchmann
2021-08-29 11:17   ` Oliver Hartkopp
2021-08-29 18:28     ` AW: " Sven Schuchmann
2021-08-29 20:14       ` Oliver Hartkopp
2021-08-29 20:28         ` Marc Kleine-Budde
2021-08-29 21:09         ` AW: AW: AW: " Sven Schuchmann
2021-08-30  7:55           ` Sven Schuchmann
2021-08-30 12:44             ` Oliver Hartkopp [this message]

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=6f9a3a93-fa0e-f039-6332-5ac0d4064731@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=schuchmann@schleissheimer.de \
    /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.