From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] static_key: fix timer bugs & change api (a bit)
Date: Thu, 17 Oct 2013 12:43:38 +0200 [thread overview]
Message-ID: <525FBF5A.3040307@redhat.com> (raw)
In-Reply-To: <1382004631-25895-1-git-send-email-rkrcmar@redhat.com>
Il 17/10/2013 12:10, Radim Krčmář ha scritto:
> While fixing a simple crash on kvm module unload
>
> 1: rate_limit timer can fire after we free its key's module memory.
>
> I noticed other deficiencies in jump_label/static_key code
> (The most important is 4.)
>
> 2: jump_label_rate_limit() uses an initializator and thus cannot be used
> more than once, leaving no good way to change the timeout.
>
> I have made the API easier on programmers: [1/7]
> * timer is automatically flushed on rmmod
> * jump_label_rate_limit() initializes only once
> - pretty hacky, but we cannot automatically initialize on
> kernel_init/insmod due to insufficient information and while I
> would love getting it through another section, it is probably
> better to do a useless check with this low-rate operation
> * we could flush the timer on change
> * 'init()' + 'set()' (+ 'exit()' ?) would be an alternative ...
>
> 3: schedule_delayed_work() does not queue the work if one is already
> pending, but atomic_inc(&key->enabled) is called anyway in
> static_key_slow_dec_deferred(), with the false belief it will be
> decreased when the timer fires.
>
> Fixed in [2,3,4/7], by addition of static_key_slow_inc_deferred().
I think you're doing a bit too much for one series. Let's focus on the
bugfix and perhaps the improvements to the deferred static key API, that
is patches 1/2/3/4.
Paolo
prev parent reply other threads:[~2013-10-17 10:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 10:10 [PATCH 0/7] static_key: fix timer bugs & change api (a bit) Radim Krčmář
2013-10-17 10:10 ` [PATCH 1/7] static_key: flush rate limit timer on rmmod Radim Krčmář
2013-10-17 10:35 ` Paolo Bonzini
2013-10-18 7:24 ` Radim Krčmář
2013-10-17 10:10 ` [PATCH 2/7] static_key: add static_key_slow_inc_deferred() Radim Krčmář
2013-10-17 10:10 ` [PATCH 3/7] static_key: keep deferred enabled counter debt Radim Krčmář
2013-10-17 10:10 ` [PATCH 4/7] static_key: use static_key_slow_inc_deferred() Radim Krčmář
2013-10-17 10:39 ` Paolo Bonzini
2013-10-18 7:29 ` Radim Krčmář
2013-10-17 10:10 ` [PATCH 5/7] jump_label: relax branch hinting restrictions Radim Krčmář
2013-10-17 10:10 ` Radim Krčmář
2013-10-17 10:10 ` Radim Krčmář
2013-10-17 10:10 ` Radim Krčmář
2013-10-17 17:35 ` Steven Rostedt
2013-10-17 17:35 ` Steven Rostedt
2013-10-17 17:35 ` Steven Rostedt
2013-10-17 17:35 ` Steven Rostedt
2013-10-18 7:30 ` Radim Krčmář
2013-10-18 7:30 ` Radim Krčmář
2013-10-18 7:30 ` Radim Krčmář
2013-10-18 7:30 ` Radim Krčmář
2013-10-17 10:10 ` [PATCH 7/7] init: execute jump_label_init() earlier Radim Krčmář
2013-10-17 10:43 ` Paolo Bonzini [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=525FBF5A.3040307@redhat.com \
--to=pbonzini@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.com \
/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.