RE: [PATCH] mm: moving dirty pages balancing to pdfludh entirely

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

 



Nikita Danilov writes:
> You are inhumane. :-)
OK. A lame argument was a joke.

> No. User thread will not write _all_ dirty pages (if it does---it's a
> bug in the current code and should be fixed):

Some bugs are fixed by the patch.
Current kernel generates pdflush thread unlimitedly. It was patched up
by introducing MAX_PDFLUSH_THREADS=8. Why just 8? Now
MAX_PDFLUSH_THREADS still present. But it could be removed.
Unlimited thread generation is fixed in proposed patch.

Now we are discussing other wonderful constant write_chunk=48. Why 48?
The patch deletes this magic constant using:
-			.nr_to_write	= write_chunk,
It was needed in user thread only.

If user thread A writes 1 byte into disk it has to write not all but 48
dirty pages. User main work is paused. User thread B continues
generating of dirty pages. Thread B is main generator of dirty pages.
Thread A found was able to write-out 47 pages only because user B locks
inodes. That is why user A forced to wait 0.1 sec and than repeat
compulsory community works. User thread lunch wide inodes scanning and
list creating but interrupted after 48 pages. It is inefficient method. 

You can see in very first mail that write(2) latency is ...; 43; 292;
346; 368 ... 400 msec. You may want to mark that there was no one
latency time 43<t<292 msec while 130,000 writes were made during
benchmark running.

Proposed patch deletes long latency fluctuations and increases
throughput. The patch is benchmarked on real nowadays machines.

Leonid
-----Original Message-----
From: Nikita Danilov [mailto:[email protected]] 
Sent: Thursday, July 06, 2006 10:34 AM
To: Ananiev, Leonid I
Cc: Bret Towe; Linux Kernel Mailing List
Subject: Re: [PATCH] mm: moving dirty pages balancing to pdfludh
entirely

Ananiev, Leonid I writes:
 > Nikita Danilov writes:
 > > Some people do, should they suffer? :-)
 > You - yes. You have used that example as an argument incorrectly.

You are inhumane. :-) What is incorrect in assuming people may have many
devices?

 > 
 > > Not _all_, only nr_to_write of them
 > 	Yes. User thread writes all dirty pages in the system calling

No. User thread will not write _all_ dirty pages (if it does---it's a
bug in the current code and should be fixed):

balance_dirty_pages():
			if (pages_written >= write_chunk)
				break;		/* We've done our duty
*/

writeback_inodes():
		if (wbc->nr_to_write <= 0)
			break;

sync_sb_inodes():
		if (wbc->nr_to_write <= 0)
			break;

mpage_writepages():
			if (ret || (--(wbc->nr_to_write) <= 0))
				done = 1;

Everywhere down call-chain ->nr_to_write is checked.

 > writeback_inodes() and after it tests
 > 			if (pages_written >= write_chunk)

[rants skipped.]

 > 
 > Leonid

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux