From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
linux-can@vger.kernel.org, netdev@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC] Questionable RCU/BH usage in cgw_create_job().
Date: Thu, 30 Nov 2023 20:56:26 +0100 [thread overview]
Message-ID: <94c27fa1-bf19-48ae-bc20-7530d97bbd5f@hartkopp.net> (raw)
In-Reply-To: <20231130164330.bYbMzPz7@linutronix.de>
Hi Sebastian,
On 30.11.23 17:43, Sebastian Andrzej Siewior wrote:
> On 2023-10-31 17:52:47 [+0100], To Oliver Hartkopp wrote:
>> The point is to replace/ update cf_mod at runtime while following RCU
>> rules so always either new or the old object is observed. Never an
>> intermediate step.
>
> Do you want me to take care of it?
Yes, sorry.
In fact I've searched some time what would fit best without getting a
clear picture.
As the changes triggered by the netlink update should come into action
with the next processed CAN frame I have thought about adding a shadow
'mod' structure which is written instantly.
And then a flag could be set, that is switched by the next incoming CAN
frame.
I just would have a problem with performing some memory allocation for
the 'mod' updates which might take some unpredictable time.
If you have some cool ideas please let me know. I'm unsure what is the
most effective and performant approach for this use case.
Many thanks,
Oliver
next prev parent reply other threads:[~2023-11-30 19:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 11:23 [RFC] Questionable RCU/BH usage in cgw_create_job() Sebastian Andrzej Siewior
2023-10-31 16:14 ` Oliver Hartkopp
2023-10-31 16:52 ` Sebastian Andrzej Siewior
2023-11-30 16:43 ` Sebastian Andrzej Siewior
2023-11-30 19:56 ` Oliver Hartkopp [this message]
2023-12-21 12:43 ` Oliver Hartkopp
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=94c27fa1-bf19-48ae-bc20-7530d97bbd5f@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=bigeasy@linutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.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.