public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>,
	mingo@elte.hu, linux-kernel@vger.kernel.org, oleg@redhat.com,
	travis@sgi.com, a.p.zijlstra@chello.nl,
	mm-commits@vger.kernel.org
Subject: Re: + work_on_cpu-rewrite-it-to-create-a-kernel-thread-on-demand.patch  added to -mm tree
Date: Wed, 4 Feb 2009 14:28:11 +1030	[thread overview]
Message-ID: <200902041428.12059.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090203112529.26e6bf76.akpm@linux-foundation.org>

On Wednesday 04 February 2009 05:55:29 Andrew Morton wrote:
> On Tue, 3 Feb 2009 17:58:13 +0100
> Fr__d__ric Weisbecker <fweisbec@gmail.com> wrote:
> 
> > 2009/2/3 Ingo Molnar <mingo@elte.hu>:
> > >
> > > * akpm@linux-foundation.org <akpm@linux-foundation.org> wrote:
> > >
> > >> ------------------------------------------------------
> > >> Subject: work_on_cpu(): rewrite it to create a kernel thread on demand
> > >> From: Andrew Morton <akpm@linux-foundation.org>
> > >>
> > >> The various implemetnations and proposed implemetnations of work_on_cpu()
> > >> are vulnerable to various deadlocks because they all used queues of some
> > >> form.
> > >>
> > >> Unrelated pieces of kernel code thus gained dependencies wherein if one
> > >> work_on_cpu() caller holds a lock which some other work_on_cpu() callback
> > >> also takes, the kernel could rarely deadlock.
> > >>
> > >> Fix this by creating a short-lived kernel thread for each work_on_cpu()
> > >> invokation.
> > >>
> > >> This is not terribly fast, but the only current caller of work_on_cpu() is
> > >> pci_call_probe().
> > >
> > > hm, it's quite ugly as well
> 
> No it isn't.
> 
> It's no less ugly than the current code.
> 
> It's less buggy than the current code.

Whatever, I like your version.

Tho making it a series of 5 and exposing rdmsr_on_cpu/wrmsr_on_cpu for other
uses would be even better.

Thanks,
Rusty.

  reply	other threads:[~2009-02-04  3:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200902031058.n13AwOoK016719@imap1.linux-foundation.org>
2009-02-03 12:11 ` + work_on_cpu-rewrite-it-to-create-a-kernel-thread-on-demand.patch added to -mm tree Ingo Molnar
2009-02-03 16:58   ` Frédéric Weisbecker
2009-02-03 19:25     ` Andrew Morton
2009-02-04  3:58       ` Rusty Russell [this message]
2009-02-04  4:16         ` Andrew Morton
2009-02-04 10:46           ` Rusty Russell
2009-02-12 20:38       ` Eric W. Biederman
2009-02-12 20:48         ` Andrew Morton
2009-02-12 22:08           ` Eric W. Biederman
2009-02-12 22:13             ` Eric W. Biederman
2009-02-12 22:23               ` Andrew Morton
2009-02-12 23:04                 ` Eric W. Biederman
2009-02-12 22:20             ` Andrew Morton
2009-02-13 21:21         ` Rusty Russell

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=200902041428.12059.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mm-commits@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=travis@sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox