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]
Message-ID: <1279805220.3044.56.camel@localhost>
Date:	Thu, 22 Jul 2010 16:27:00 +0300
From:	Artem Bityutskiy <dedekind1@...il.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Dave Chinner <david@...morbit.com>,
	Dave Chinner <dchinner@...hat.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCHv2 11/11] writeback: prevent unnecessary bdi threads
 wakeups

On Thu, 2010-07-22 at 05:00 -0400, Christoph Hellwig wrote:
> On Thu, Jul 22, 2010 at 10:41:55AM +1000, Dave Chinner wrote:
> > 	if (wakeup_bdi) {
> > 		trace_writeback_wakeup(bdi)
> > 		spin_lock(&bdi->wb_lock);
> > 		if (!bdi->wb.task) {{
> > 			trace_writeback_wakeup_nothread(bdi);
> > 			wake_up_process(default_backing_dev_info.wb.task);
> > 		} else
> > 			wake_up_process(bdi->wb.task);
> > 		spin_unlock(&bdi->wb_lock);
> 
> That gives us duplicate traces for the first case, what about:
> 
> 	 if (wakeup_bdi) {
> 	 	spin_lock(&bdi->wb_lock);
> 		if (bdi->wb.task) {
> 			trace_writeback_wake_thread(bdi);
> 			wake_up_process(bdi->wb.task);
> 		} else {
> 			trace_writeback_wake_forker_thread(bdi);
> 			wake_up_process(default_backing_dev_info.wb.task);
> 		}
> 		spin_unlock(&bdi->wb_lock);
> 	}

But Dave's version is what we have in 'bdi_queue_work()' as well. I it
is OK - first trace point is triggered every time the bdi thread is
_wanted_ to be woken up.

Then if it does not exist, we need to do something special to wake it up
(ask the forker thread which to create it). This is a different event
and we use a different trace point.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

--
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