[lkml]   [2007]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)

On Thu, 26 Apr 2007, Pavel Machek wrote:
> Ok, I guess I'll have nightmares of DMA controllers doing DMAs from
> chips that are no longer there tonight.

Umm. Welcome to the 21st century: we don't do that "separate DMA
controller" thing any more. All devices do their own DMA.

> Only the fact that we are currently using same device call during
> snapshot() and during restore(). We obviously could do _5_ device
> calls
> (suspend/resume/freeze/quiesce_disable_dma/thaw)
> ...but that looks like too many calls to me.

I'd much rather have five or even more functions that each do *one*
obvious thing.

Think like a device driver writer: would you prefer to just implement five
functions that do something very specific that you know trivially how to
do ("I know how to disable interrupts and DMA") or would you want to do
some high-level opertion that you don't even know why the caller asks you
to suspend? What does "suspend()" even mean when the caller is just going
to wake up up immediately again? Is it performance-critical? Should I tear
down all my DMA's? I dunno!

In other words, splitting things up actually makes things simpler. That's
*doubly* true if you can then give each specific function some really
clear goals.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-04-26 02:41    [W:0.806 / U:4.452 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site