lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Jan 2009 23:25:19 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Mike Travis <travis@....com>, Ingo Molnar <mingo@...hat.com>,
	Dave Jones <davej@...hat.com>, cpufreq@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] work_on_cpu: Use our own workqueue.

On Tue, 27 Jan 2009 17:35:11 +1030 Rusty Russell <rusty@...tcorp.com.au> wrote:

> On Monday 26 January 2009 17:31:30 Andrew Morton wrote:
> > On Mon, 26 Jan 2009 17:11:43 +1030 Rusty Russell <rusty@...tcorp.com.au> wrote:
> > 
> > > On Saturday 24 January 2009 18:45:37 Andrew Morton wrote:
> > > > Pity the poor reader who comes along trying to work out why this exists.
> > 
> > (chirp, chirp)
> 
> I disagree.  It's simple; we create a workqueue and we use it.  There's no
> confusion here.

Reader's first and most important question is "why does this exist".

> > > None of these options are appealing...
> > 
> > Can we try harder please?  10 screenfuls of kernel threads in the ps
> > output is just irritating.
> > 
> > How about banning the use of work_on_cpu() from schedule_work()
> > handlers and then fixing that driver somehow?
> 
> Again, that's how we got here in the first place.  I didn't realize the
> twisty path by which the acpi cpufreq code could be called.  And there
> may well be others.  So I want work_on_cpu to be completely generic.

But it isn't generic.  The patch just moved the deadlock from one queue
to another.  Making work_on_cu() truly generic is quite hard!

> But it's a general comment about fixing a general issue.  The currently
> known case is not directly relevent; that it can happen and it's restricting
> the use of this otherwise-general API is.

I think we should switch acpi-cpufreq to smp_call_function(), revert
this stuff and ban the calling of work_on_cpu() under locks.

> A little confused at all this vitriol,

Well let's see.

- it was badly changelogged

- it was badly commented

- it's slow.  In many ways, including the unnecessary serialisation
  of each cross-cpu call in acpi-cpufreq.

- it consumes a tremendous amount of resources just to fix some
  acpi locking snafu

- it adds yet another zillion kernel threads

- it's still deadlockable

- it got sent to Linus while still under active discussion

- and it got merged

- Oleg is the usual workqueue developer and wasn't even cc'ed.

- I am the usual workqueue reviewer/merger (and would prefer to remain
  thus, please) and I wasn't cc'ed either.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ