ClangBuiltLinux / cbl-meetup

Information about our 2022 meetup in Dublin
https://clangbuiltlinux.github.io/cbl-meetup/
0 stars 0 forks source link

[Talk Proposal] Status Report: Broken Dependency Orderings in the Linux Kernel #5

Open paulhdk opened 2 years ago

paulhdk commented 2 years ago

Happy to do a dry run of my Plumber's talk to hopefully enable some more discussion on (broken) dependency orderings in the Linux kernel. But if people don't want to hear the same talk twice, that's totally fine and understandable :-)

Abstract From the LPC Website

Potentially broken dependency orderings in the Linux kernel have been a recurring theme on the Linux kernel mailing list and even Linux Plumbers Conference. The Linux kernel community fears that with ever-more sophisticated compiler optimizations, it would become possible for modern compilers to undermine the Linux kernel memory consistency model when optimizing code for weakly-ordered architectures, e.g. ARM or POWER.

Specifically, the community was worried about address and control dependencies being broken, with the latter having already seen several unfruitful [PATCH RFC]’s on LKML.

This “fear” of optimizing compilers eventually lead to READ_ONCE() accesses being promoted to memory-order-acquire semantics for arm64 kernel builds with link-time optimization (LTO) enabled, leaving valuable performance improvements on the table as this imposes ordering constraints on non-dependent instructions.

However, the severity of this problem had not been investigated as of yet, with previous discussions lacking the evidence of concrete instances of broken dependency orderings.

We are pleased (or not so pleased) to report that, based on our work, we have indeed found broken dependency orderings in the Linux kernel. We would now like to open the discussion about, but not limited to, the severity of the broken dependencies we found thus far, whether they warrant dedicating more attention to this problem, and potential (lightweight or heavyweight) fixes.

A brief description for the website

Compilers are capable of undermining the Linux kernel memory model. But to what extent are they doing so? We present our current findings in form of a tool which checks for broken dependency orderings at compile time, and would like to open a discussion around the topic.

The people who will give the presentation

Paul Heidekrüger

Estimate of how long the presentation will be

15 -30 Minutes + discussion

bwendling commented 2 years ago

Thanks, @PBHDK. I should have gotten back to you sooner. I'll be scheduling the talks and hacking sessions soon. Glad to have you on board!

paulhdk commented 2 years ago

Quick update, @gwelymernans. Aiming for 30 mins (plus discussion) and will be in Dublin on the Sunday, i.e. September 11. In case I'm scheduled for Saturday, I would have to do my talk remotely. Sadly this is the way it worked out with flights.

In any case, will there be a an option to join for the talks remotely? Would love to hear the other talks too in case they're on the Saturday.

bwendling commented 2 years ago

Hi @PBHDK Thanks for the update. I have you scheduled for Sunday. You'll have plenty of time for your presentation. Thanks for letting me know!

paulhdk commented 2 years ago

Ah, I am seeing the schedule now - my bad :-)

Would it be possible to push my talk a little? My plane lands at 9:45am, and I'll try to make my way to the city ASAP, but can't guarantee anything before 11:15 (I guess?). Sorry, I should've been clearer on this in my first message.

EDIT: Forgot to tag you, @gwelymernans

bwendling commented 2 years ago

@PBHDK I'm sorry that I didn't get back to you sooner. No worries about the time. We'll be able to work around your schedule. This is a very casual meet-up, so we can move things around easily. :-)

paulhdk commented 2 years ago

Brilliant, thanks @gwelymernans ! I'll see you all tomorrow then :-)