Re: [RFC][PATCH -mm 7/7] Freezer: Use freezing timeout more efficiently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, 14 July 2007 01:43, Pavel Machek wrote:
> Hi!
> 
> > There is the problem with try_to_freeze_tasks() that it always loops until the
> > timeout expires, even if it is certain to fail much earlier.  Namely, if there
> > are uninterruptible tasks waiting for some frozen tasks to let them continue,
> > try_to_freeze_tasks() will certainly fail and it shouldn't waste time in that
> > cases.
> > 
> > To detect such situations, we can check if the number of tasks that haven't
> > frozen yet changes between subsequent iterations of the main loop in
> > try_to_freeze_tasks().  If this number hasn't been changing for sufficiently
> > long time (say, 250 ms), then most probably some uninterruptible tasks are
> > blocked by some frozen tasks and we should break out of this stalemate.  Thus,
> > it seems reasonable to thaw the tasks that have already been frozen without
> > clearing the freeze requests of the tasks that are refusing to freeze.  This
> > way, if these tasks are really blocked by the frozen ones, they will get extra
> > chance to freeze themselves after we have thawed the other tasks and before we
> > request those tasks to freeze again.  Next, the freezing loop can be repeated
> > and so on, until all tasks are frozen or the timeout expires.
> 
> I still don't quite like this patch... it is kind of trick we should
> not have to play. Can we at least get confirmation it helps in the
> FUSE case?

Well, anyone having problems with FUSE vs the freezer please check. :-)

I think I'll send the series to Andrew without this patch.  Would that be OK?

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux