Re: Fixed at last!
Harald Judt <[email protected]> Mon, 04 Jun 2012 19:02:55 +0200
| Newsgroups | gmane.linux.swsusp.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 01.06.2012 13:25, schrieb Nigel Cunningham: > Hi all. > > I thought you might like to hear some good news. > > I finally found some time to put a concerted effort into finding and > fixing the cause of TuxOnIce not working with the BFS scheduler. The > issue turned out, I think, to be the same one that's been causing those > pesky occasional failures to read compressed data (the -22 error). > > The problem turned out to be nice and simple: when we create the extra > threads for doing multithreaded I/O, we bind each one to its own CPU. > That's find and dandy until we get to the atomic copy, when we do CPU > hotplugging. The affinities get broken and threads end up stomping over > each others' memory. It seems that BFS does a better job of breaking the > affinities than the normal scheduler, which made the problem easier to > find. > > So, after thinking all this time that it was a locking problem in the > code that was already there, it turned out to be a few lines of code > that weren't there instead: the solution is to simply get each thread to > remember its affinity and reset it before it starts to do any work. Great work, thanks a lot! Finally fixed and now we can use tuxonice with BFS again. Harald -- `Experience is the best teacher.'