mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: about prandom vs __this_cpu_read()
Date: Tue, 13 Oct 2020 04:55:29 +0200	[thread overview]
Message-ID: <20201013025529.GA12006@1wt.eu> (raw)

Linus,

the latest prandom series I sent you changes __this_cpu_read() to
this_cpu_read() since LKP returned the following trace on i386:

[    9.061912]  dump_stack+0x54/0x6e
[    9.061912]  check_preemption_disabled+0xb1/0xc0
[    9.061912]  __this_cpu_preempt_check+0xf/0x11
[    9.065516]  __igt_reserve+0x91/0x580
[    9.065516]  igt_reserve+0x5b/0xc0
[    9.065516]  test_drm_mm_init+0x78/0xa9

I got another report that it breaks on ARC (trivial fix consists in
adding irqflags.h in prandom.h) but that made me wonder, we're using
this to access and update the net_rand_noise variable only, wouldn't
it be better to use the faster raw_cpu_read()/raw_cpu_write() there,
considering we don't care about concurrent accesses since they simply
add even more impredictability to the noise ?

If so, I'll update this branch and will send you another PR.

Thanks,
Willy

                 reply	other threads:[~2020-10-13  2:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20201013025529.GA12006@1wt.eu \
    --to=w@1wt.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome