<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/mm/backing-dev.c, branch v3.6.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.6.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.6.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-08-03T21:24:44Z</updated>
<entry>
<title>vfs: kill write_super and sync_supers</title>
<updated>2012-08-03T21:24:44Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-07-25T15:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f0cd2dbb6cf387c11f87265462e370bb5469299e'/>
<id>urn:sha1:f0cd2dbb6cf387c11f87265462e370bb5469299e</id>
<content type='text'>
Finally we can kill the 'sync_supers' kernel thread along with the
'-&gt;write_super()' superblock operation because all the users are gone.
Now every file-system is supposed to self-manage own superblock and
its dirty state.

The nice thing about killing this thread is that it improves power management.
Indeed, 'sync_supers' is a source of monotonic system wake-ups - it woke up
every 5 seconds no matter what - even if there were no dirty superblocks and
even if there were no file-systems using this service (e.g., btrfs and
journalled ext4 do not need it). So it was wasting power most of the time. And
because the thread was in the core of the kernel, all systems had to have it.
So I am quite happy to make it go away.

Interestingly, this thread is a left-over from the pdflush kernel thread which
was a self-forking kernel thread responsible for all the write-back in old
Linux kernels. It was turned into per-block device BDI threads, and
'sync_supers' was a left-over. Thus, R.I.P, pdflush as well.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>mm: prepare for removal of obsolete /proc/sys/vm/nr_pdflush_threads</title>
<updated>2012-08-01T01:42:40Z</updated>
<author>
<name>Wanpeng Li</name>
<email>liwp@linux.vnet.ibm.com</email>
</author>
<published>2012-07-31T23:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3965c9ae47d64aadf6f13b6fcd37767b83c0689a'/>
<id>urn:sha1:3965c9ae47d64aadf6f13b6fcd37767b83c0689a</id>
<content type='text'>
Since per-BDI flusher threads were introduced in 2.6, the pdflush
mechanism is not used any more.  But the old interface exported through
/proc/sys/vm/nr_pdflush_threads still exists and is obviously useless.

For back-compatibility, printk warning information and return 2 to notify
the users that the interface is removed.

Signed-off-by: Wanpeng Li &lt;liwp@linux.vnet.ibm.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>block: Convert BDI proportion calculations to flexible proportions</title>
<updated>2012-06-08T23:37:56Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-05-24T16:59:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eb608e3a344b3af21300360fcf868f8b4e808a8e'/>
<id>urn:sha1:eb608e3a344b3af21300360fcf868f8b4e808a8e</id>
<content type='text'>
Convert calculations of proportion of writeback each bdi does to new flexible
proportion code. That allows us to use aging period of fixed wallclock time
which gives better proportion estimates given the hugely varying throughput of
different devices.

Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>backing-dev: fix wakeup timer races with bdi_unregister()</title>
<updated>2012-02-01T08:52:49Z</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2012-01-29T18:17:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2673b4cf5d59c3ee5e0c12f6d734d38770324dc4'/>
<id>urn:sha1:2673b4cf5d59c3ee5e0c12f6d734d38770324dc4</id>
<content type='text'>
While 7a401a972df8e18 ("backing-dev: ensure wakeup_timer is deleted")
addressed the problem of the bdi being freed with a queued wakeup
timer, there are other races that could happen if the wakeup timer
expires after/during bdi_unregister(), before bdi_destroy() is called.

wakeup_timer_fn() could attempt to wakeup a task which has already has
been freed, or could access a NULL bdi-&gt;dev via the wake_forker_thread
tracepoint.

Cc: &lt;stable@kernel.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Reported-by: Chanho Min &lt;chanho.min@lge.com&gt;
Reviewed-by: Namjae Jeon &lt;linkinjeon@gmail.com&gt;
Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Signed-off-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>freezer: implement and use kthread_freezable_should_stop()</title>
<updated>2011-11-21T20:32:23Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-11-21T20:32:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8a32c441c1609f80e55df75422324a1151208f40'/>
<id>urn:sha1:8a32c441c1609f80e55df75422324a1151208f40</id>
<content type='text'>
Writeback and thinkpad_acpi have been using thaw_process() to prevent
deadlock between the freezer and kthread_stop(); unfortunately, this
is inherently racy - nothing prevents freezing from happening between
thaw_process() and kthread_stop().

This patch implements kthread_freezable_should_stop() which enters
refrigerator if necessary but is guaranteed to return if
kthread_stop() is invoked.  Both thaw_process() users are converted to
use the new function.

Note that this deadlock condition exists for many of freezable
kthreads.  They need to be converted to use the new should_stop or
freezable workqueue.

Tested with synthetic test case.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Henrique de Moraes Holschuh &lt;ibm-acpi@hmh.eng.br&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
</content>
</entry>
<entry>
<title>backing-dev: ensure wakeup_timer is deleted</title>
<updated>2011-11-11T12:29:04Z</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin.vincent@stericsson.com</email>
</author>
<published>2011-11-11T12:29:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a401a972df8e184b3d1a3fc958c0a4ddee8d312'/>
<id>urn:sha1:7a401a972df8e184b3d1a3fc958c0a4ddee8d312</id>
<content type='text'>
bdi_prune_sb() in bdi_unregister() attempts to removes the bdi links
from all super_blocks and then del_timer_sync() the writeback timer.

However, this can race with __mark_inode_dirty(), leading to
bdi_wakeup_thread_delayed() rearming the writeback timer on the bdi
we're unregistering, after we've called del_timer_sync().

This can end up with the bdi being freed with an active timer inside it,
as in the case of the following dump after the removal of an SD card.

Fix this by redoing the del_timer_sync() in bdi_destory().

 ------------[ cut here ]------------
 WARNING: at /home/rabin/kernel/arm/lib/debugobjects.c:262 debug_print_object+0x9c/0xc8()
 ODEBUG: free active (active state 0) object type: timer_list hint: wakeup_timer_fn+0x0/0x180
 Modules linked in:
 Backtrace:
 [&lt;c00109dc&gt;] (dump_backtrace+0x0/0x110) from [&lt;c0236e4c&gt;] (dump_stack+0x18/0x1c)
  r6:c02bc638 r5:00000106 r4:c79f5d18 r3:00000000
 [&lt;c0236e34&gt;] (dump_stack+0x0/0x1c) from [&lt;c0025e6c&gt;] (warn_slowpath_common+0x54/0x6c)
 [&lt;c0025e18&gt;] (warn_slowpath_common+0x0/0x6c) from [&lt;c0025f28&gt;] (warn_slowpath_fmt+0x38/0x40)
  r8:20000013 r7:c780c6f0 r6:c031613c r5:c780c6f0 r4:c02b1b29
 r3:00000009
 [&lt;c0025ef0&gt;] (warn_slowpath_fmt+0x0/0x40) from [&lt;c015eb4c&gt;] (debug_print_object+0x9c/0xc8)
  r3:c02b1b29 r2:c02bc662
 [&lt;c015eab0&gt;] (debug_print_object+0x0/0xc8) from [&lt;c015f574&gt;] (debug_check_no_obj_freed+0xac/0x1dc)
  r6:c7964000 r5:00000001 r4:c7964000
 [&lt;c015f4c8&gt;] (debug_check_no_obj_freed+0x0/0x1dc) from [&lt;c00a9e38&gt;] (kmem_cache_free+0x88/0x1f8)
 [&lt;c00a9db0&gt;] (kmem_cache_free+0x0/0x1f8) from [&lt;c014286c&gt;] (blk_release_queue+0x70/0x78)
 [&lt;c01427fc&gt;] (blk_release_queue+0x0/0x78) from [&lt;c015290c&gt;] (kobject_release+0x70/0x84)
  r5:c79641f0 r4:c796420c
 [&lt;c015289c&gt;] (kobject_release+0x0/0x84) from [&lt;c0153ce4&gt;] (kref_put+0x68/0x80)
  r7:00000083 r6:c74083d0 r5:c015289c r4:c796420c
 [&lt;c0153c7c&gt;] (kref_put+0x0/0x80) from [&lt;c01527d0&gt;] (kobject_put+0x48/0x5c)
  r5:c79643b4 r4:c79641f0
 [&lt;c0152788&gt;] (kobject_put+0x0/0x5c) from [&lt;c013ddd8&gt;] (blk_cleanup_queue+0x68/0x74)
  r4:c7964000
 [&lt;c013dd70&gt;] (blk_cleanup_queue+0x0/0x74) from [&lt;c01a6370&gt;] (mmc_blk_put+0x78/0xe8)
  r5:00000000 r4:c794c400
 [&lt;c01a62f8&gt;] (mmc_blk_put+0x0/0xe8) from [&lt;c01a64b4&gt;] (mmc_blk_release+0x24/0x38)
  r5:c794c400 r4:c0322824
 [&lt;c01a6490&gt;] (mmc_blk_release+0x0/0x38) from [&lt;c00de11c&gt;] (__blkdev_put+0xe8/0x170)
  r5:c78d5e00 r4:c74083c0
 [&lt;c00de034&gt;] (__blkdev_put+0x0/0x170) from [&lt;c00de2c0&gt;] (blkdev_put+0x11c/0x12c)
  r8:c79f5f70 r7:00000001 r6:c74083d0 r5:00000083 r4:c74083c0
 r3:00000000
 [&lt;c00de1a4&gt;] (blkdev_put+0x0/0x12c) from [&lt;c00b0724&gt;] (kill_block_super+0x60/0x6c)
  r7:c7942300 r6:c79f4000 r5:00000083 r4:c74083c0
 [&lt;c00b06c4&gt;] (kill_block_super+0x0/0x6c) from [&lt;c00b0a94&gt;] (deactivate_locked_super+0x44/0x70)
  r6:c79f4000 r5:c031af64 r4:c794dc00 r3:c00b06c4
 [&lt;c00b0a50&gt;] (deactivate_locked_super+0x0/0x70) from [&lt;c00b1358&gt;] (deactivate_super+0x6c/0x70)
  r5:c794dc00 r4:c794dc00
 [&lt;c00b12ec&gt;] (deactivate_super+0x0/0x70) from [&lt;c00c88b0&gt;] (mntput_no_expire+0x188/0x194)
  r5:c794dc00 r4:c7942300
 [&lt;c00c8728&gt;] (mntput_no_expire+0x0/0x194) from [&lt;c00c95e0&gt;] (sys_umount+0x2e4/0x310)
  r6:c7942300 r5:00000000 r4:00000000 r3:00000000
 [&lt;c00c92fc&gt;] (sys_umount+0x0/0x310) from [&lt;c000d940&gt;] (ret_fast_syscall+0x0/0x30)
 ---[ end trace e5c83c92ada51c76 ]---

Cc: stable@kernel.org
Signed-off-by: Rabin Vincent &lt;rabin.vincent@stericsson.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux</title>
<updated>2011-11-07T03:02:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-07T03:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=208bca0860406d16398145ddd950036a737c3c9d'/>
<id>urn:sha1:208bca0860406d16398145ddd950036a737c3c9d</id>
<content type='text'>
* 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: Add a 'reason' to wb_writeback_work
  writeback: send work item to queue_io, move_expired_inodes
  writeback: trace event balance_dirty_pages
  writeback: trace event bdi_dirty_ratelimit
  writeback: fix ppc compile warnings on do_div(long long, unsigned long)
  writeback: per-bdi background threshold
  writeback: dirty position control - bdi reserve area
  writeback: control dirty pause time
  writeback: limit max dirty pause time
  writeback: IO-less balance_dirty_pages()
  writeback: per task dirty rate limit
  writeback: stabilize bdi-&gt;dirty_ratelimit
  writeback: dirty rate control
  writeback: add bg_threshold parameter to __bdi_update_bandwidth()
  writeback: dirty position control
  writeback: account per-bdi accumulated dirtied pages
</content>
</entry>
<entry>
<title>mm-add-comment-explaining-task-state-setting-in-bdi_forker_thread-fix</title>
<updated>2011-11-01T00:30:49Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2011-11-01T00:08:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=20c8c62891a346e09c8d26de41ce78bd7a76c5b0'/>
<id>urn:sha1:20c8c62891a346e09c8d26de41ce78bd7a76c5b0</id>
<content type='text'>
fiddle wording

Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>writeback: Add a 'reason' to wb_writeback_work</title>
<updated>2011-10-30T16:33:36Z</updated>
<author>
<name>Curt Wohlgemuth</name>
<email>curtw@google.com</email>
</author>
<published>2011-10-08T03:54:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e175a1835ffc979e55787774e58ec79e41957d7'/>
<id>urn:sha1:0e175a1835ffc979e55787774e58ec79e41957d7</id>
<content type='text'>
This creates a new 'reason' field in a wb_writeback_work
structure, which unambiguously identifies who initiates
writeback activity.  A 'wb_reason' enumeration has been
added to writeback.h, to enumerate the possible reasons.

The 'writeback_work_class' and tracepoint event class and
'writeback_queue_io' tracepoints are updated to include the
symbolic 'reason' in all trace events.

And the 'writeback_inodes_sbXXX' family of routines has had
a wb_stats parameter added to them, so callers can specify
why writeback is being started.

Acked-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Curt Wohlgemuth &lt;curtw@google.com&gt;
Signed-off-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>writeback: stabilize bdi-&gt;dirty_ratelimit</title>
<updated>2011-10-03T13:08:57Z</updated>
<author>
<name>Wu Fengguang</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2011-08-26T21:53:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7381131cbcf7e15d201a0ffd782a4698efe4e740'/>
<id>urn:sha1:7381131cbcf7e15d201a0ffd782a4698efe4e740</id>
<content type='text'>
There are some imperfections in balanced_dirty_ratelimit.

1) large fluctuations

The dirty_rate used for computing balanced_dirty_ratelimit is merely
averaged in the past 200ms (very small comparing to the 3s estimation
period for write_bw), which makes rather dispersed distribution of
balanced_dirty_ratelimit.

It's pretty hard to average out the singular points by increasing the
estimation period. Considering that the averaging technique will
introduce very undesirable time lags, I give it up totally. (btw, the 3s
write_bw averaging time lag is much more acceptable because its impact
is one-way and therefore won't lead to oscillations.)

The more practical way is filtering -- most singular
balanced_dirty_ratelimit points can be filtered out by remembering some
prev_balanced_rate and prev_prev_balanced_rate. However the more
reliable way is to guard balanced_dirty_ratelimit with task_ratelimit.

2) due to truncates and fs redirties, the (write_bw &lt;=&gt; dirty_rate)
match could become unbalanced, which may lead to large systematical
errors in balanced_dirty_ratelimit. The truncates, due to its possibly
bumpy nature, can hardly be compensated smoothly. So let's face it. When
some over-estimated balanced_dirty_ratelimit brings dirty_ratelimit
high, dirty pages will go higher than the setpoint. task_ratelimit will
in turn become lower than dirty_ratelimit.  So if we consider both
balanced_dirty_ratelimit and task_ratelimit and update dirty_ratelimit
only when they are on the same side of dirty_ratelimit, the systematical
errors in balanced_dirty_ratelimit won't be able to bring
dirty_ratelimit far away.

The balanced_dirty_ratelimit estimation may also be inaccurate near
@limit or @freerun, however is less an issue.

3) since we ultimately want to

- keep the fluctuations of task ratelimit as small as possible
- keep the dirty pages around the setpoint as long time as possible

the update policy used for (2) also serves the above goals nicely:
if for some reason the dirty pages are high (task_ratelimit &lt; dirty_ratelimit),
and dirty_ratelimit is low (dirty_ratelimit &lt; balanced_dirty_ratelimit),
there is no point to bring up dirty_ratelimit in a hurry only to hurt
both the above two goals.

So, we make use of task_ratelimit to limit the update of dirty_ratelimit
in two ways:

1) avoid changing dirty rate when it's against the position control target
   (the adjusted rate will slow down the progress of dirty pages going
   back to setpoint).

2) limit the step size. task_ratelimit is changing values step by step,
   leaving a consistent trace comparing to the randomly jumping
   balanced_dirty_ratelimit. task_ratelimit also has the nice smaller
   errors in stable state and typically larger errors when there are big
   errors in rate.  So it's a pretty good limiting factor for the step
   size of dirty_ratelimit.

Note that bdi-&gt;dirty_ratelimit is always tracking balanced_dirty_ratelimit.
task_ratelimit is merely used as a limiting factor.

Signed-off-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
</feed>
