From: Christoph Hellwig on 23 Jul 2010 12:30 I haven't reviewed this in detail, but what ensures the timer is synchronously removed when the forker goes away? I don't see a del_timer_sync call anywhere. For now it might be easier to just skip this patch and leave it for later. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Artem Bityutskiy on 24 Jul 2010 02:10 On Fri, 2010-07-23 at 12:28 -0400, Christoph Hellwig wrote: > I haven't reviewed this in detail, but what ensures the timer is > synchronously removed when the forker goes away? Good point, thanks. > I don't see a > del_timer_sync call anywhere. For now it might be easier to just > skip this patch and leave it for later. Well, my tests showed that with this patch the flushers wake up considerably less. So I'll try to come up with a better patch. I will set-up better testing. Will hack things so that the background dirty writeout timeout is something like 1-3 jiffies and the bdi thread inactive timeout is something like 3-5 jiffies. Then will write a script which forks many tasks each of each creates a loop-back device, mounts it, does some I/O, unmounts, removes the loop-back device, and so on. If run for long time, it should give good stress to the code paths I'm working on. I have a 2-way 4-core (total 8) amd64 testbox to test. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Artem Bityutskiy on 25 Jul 2010 06:50 On Sun, 2010-07-25 at 11:29 +0300, Artem Bityutskiy wrote: > +static void wakeup_timer_fn(unsigned long data) > +{ > + struct backing_dev_info *bdi = (struct backing_dev_info *)data; > + > + spin_lock(&bdi->wb_lock); > + if (bdi->wb.task) { > + wake_up_process(bdi->wb.task); > + } else { > + /* > + * When bdi tasks are inactive for long time, they are killed. > + * In this case we have to wake-up the forker thread which > + * should create and run the bdi thread. > + */ > + wake_up_process(default_backing_dev_info.wb.task); > + } > + spin_unlock(&bdi->wb_lock); > +} OK, since now we use this lock in a timer, this should become a spin_lock_bh(). -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: writeback: add new tracepoints Next: remove dma_is_consistent API |