<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/mm/backing-dev.c, branch v2.6.37</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.37</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.37'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-10-27T00:58:44Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6</title>
<updated>2010-10-27T00:58:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-27T00:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=426e1f5cec4821945642230218876b0e89aafab1'/>
<id>urn:sha1:426e1f5cec4821945642230218876b0e89aafab1</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
  split invalidate_inodes()
  fs: skip I_FREEING inodes in writeback_sb_inodes
  fs: fold invalidate_list into invalidate_inodes
  fs: do not drop inode_lock in dispose_list
  fs: inode split IO and LRU lists
  fs: switch bdev inode bdi's correctly
  fs: fix buffer invalidation in invalidate_list
  fsnotify: use dget_parent
  smbfs: use dget_parent
  exportfs: use dget_parent
  fs: use RCU read side protection in d_validate
  fs: clean up dentry lru modification
  fs: split __shrink_dcache_sb
  fs: improve DCACHE_REFERENCED usage
  fs: use percpu counter for nr_dentry and nr_dentry_unused
  fs: simplify __d_free
  fs: take dcache_lock inside __d_path
  fs: do not assign default i_ino in new_inode
  fs: introduce a per-cpu last_ino allocator
  new helper: ihold()
  ...
</content>
</entry>
<entry>
<title>kernel: remove PF_FLUSHER</title>
<updated>2010-10-26T23:52:15Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-10-26T21:22:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=766f9164193f6dda1497bbf3861060198421fb92'/>
<id>urn:sha1:766f9164193f6dda1497bbf3861060198421fb92</id>
<content type='text'>
PF_FLUSHER is only ever set, not tested, remove it.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&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: do not sleep on the congestion queue if there are no congested BDIs or if significant congestion is not being encountered in the current zone</title>
<updated>2010-10-26T23:52:07Z</updated>
<author>
<name>Mel Gorman</name>
<email>mel@csn.ul.ie</email>
</author>
<published>2010-10-26T21:21:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e093d99763eb4cea09f8ca4f1d01f34e121d10b'/>
<id>urn:sha1:0e093d99763eb4cea09f8ca4f1d01f34e121d10b</id>
<content type='text'>
If congestion_wait() is called with no BDI congested, the caller will
sleep for the full timeout and this may be an unnecessary sleep.  This
patch adds a wait_iff_congested() that checks congestion and only sleeps
if a BDI is congested else, it calls cond_resched() to ensure the caller
is not hogging the CPU longer than its quota but otherwise will not sleep.

This is aimed at reducing some of the major desktop stalls reported during
IO.  For example, while kswapd is operating, it calls congestion_wait()
but it could just have been reclaiming clean page cache pages with no
congestion.  Without this patch, it would sleep for a full timeout but
after this patch, it'll just call schedule() if it has been on the CPU too
long.  Similar logic applies to direct reclaimers that are not making
enough progress.

Signed-off-by: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&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: account for time spent congestion_waited</title>
<updated>2010-10-26T23:52:07Z</updated>
<author>
<name>Mel Gorman</name>
<email>mel@csn.ul.ie</email>
</author>
<published>2010-10-26T21:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52bb9198668968506f9d12bf35d7f5d3f094921e'/>
<id>urn:sha1:52bb9198668968506f9d12bf35d7f5d3f094921e</id>
<content type='text'>
There is strong evidence to indicate a lot of time is being spent in
congestion_wait(), some of it unnecessarily.  This patch adds a tracepoint
for congestion_wait to record when congestion_wait() was called, how long
the timeout was for and how long it actually slept.

Signed-off-by: Mel Gorman &lt;mel@csn.ul.ie&gt;
Reviewed-by: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Reviewed-by: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Rik van Riel &lt;riel@redhat.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>fs: inode split IO and LRU lists</title>
<updated>2010-10-26T01:26:15Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2010-10-21T00:49:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ccf19a8042e343f8159f8a5fdd6a9422aa90c78'/>
<id>urn:sha1:7ccf19a8042e343f8159f8a5fdd6a9422aa90c78</id>
<content type='text'>
The use of the same inode list structure (inode-&gt;i_list) for two
different list constructs with different lifecycles and purposes
makes it impossible to separate the locking of the different
operations. Therefore, to enable the separation of the locking of
the writeback and reclaim lists, split the inode-&gt;i_list into two
separate lists dedicated to their specific tracking functions.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>bdi: Initialize noop_backing_dev_info properly</title>
<updated>2010-09-22T07:48:47Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2010-09-21T09:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=976e48f8a5b02fc33f3e5cad87fb3fcea041a49c'/>
<id>urn:sha1:976e48f8a5b02fc33f3e5cad87fb3fcea041a49c</id>
<content type='text'>
Properly initialize this backing dev info so that writeback code does not
barf when getting to it e.g. via sb-&gt;s_bdi.

Cc: stable@kernel.org
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>writeback: do not lose wakeup events when forking bdi threads</title>
<updated>2010-08-27T07:16:18Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-08-27T07:15:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6628bc74f1aa9c35dd386320bf7ec04f12edb1b3'/>
<id>urn:sha1:6628bc74f1aa9c35dd386320bf7ec04f12edb1b3</id>
<content type='text'>
This patch fixes the following issue:

INFO: task mount.nfs4:1120 blocked for more than 120 seconds.
"echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
mount.nfs4    D 00000000fffc6a21     0  1120   1119 0x00000000
 ffff880235643948 0000000000000046 ffffffff00000000 ffffffff00000000
 ffff880235643fd8 ffff880235314760 00000000001d44c0 ffff880235643fd8
 00000000001d44c0 00000000001d44c0 00000000001d44c0 00000000001d44c0
Call Trace:
 [&lt;ffffffff813bc747&gt;] schedule_timeout+0x34/0xf1
 [&lt;ffffffff813bc530&gt;] ? wait_for_common+0x3f/0x130
 [&lt;ffffffff8106b50b&gt;] ? trace_hardirqs_on+0xd/0xf
 [&lt;ffffffff813bc5c3&gt;] wait_for_common+0xd2/0x130
 [&lt;ffffffff8104159c&gt;] ? default_wake_function+0x0/0xf
 [&lt;ffffffff813beaa0&gt;] ? _raw_spin_unlock+0x26/0x2a
 [&lt;ffffffff813bc6bb&gt;] wait_for_completion+0x18/0x1a
 [&lt;ffffffff81101a03&gt;] sync_inodes_sb+0xca/0x1bc
 [&lt;ffffffff811056a6&gt;] __sync_filesystem+0x47/0x7e
 [&lt;ffffffff81105798&gt;] sync_filesystem+0x47/0x4b
 [&lt;ffffffff810e7ffd&gt;] generic_shutdown_super+0x22/0xd2
 [&lt;ffffffff810e80f8&gt;] kill_anon_super+0x11/0x4f
 [&lt;ffffffffa00d06d7&gt;] nfs4_kill_super+0x3f/0x72 [nfs]
 [&lt;ffffffff810e7b68&gt;] deactivate_locked_super+0x21/0x41
 [&lt;ffffffff810e7fd6&gt;] deactivate_super+0x40/0x45
 [&lt;ffffffff810fc66c&gt;] mntput_no_expire+0xb8/0xed
 [&lt;ffffffff810fc73b&gt;] release_mounts+0x9a/0xb0
 [&lt;ffffffff810fc7bb&gt;] put_mnt_ns+0x6a/0x7b
 [&lt;ffffffffa00d0fb2&gt;] nfs_follow_remote_path+0x19a/0x296 [nfs]
 [&lt;ffffffffa00d11ca&gt;] nfs4_try_mount+0x75/0xaf [nfs]
 [&lt;ffffffffa00d1790&gt;] nfs4_get_sb+0x276/0x2ff [nfs]
 [&lt;ffffffff810e7dba&gt;] vfs_kern_mount+0xb8/0x196
 [&lt;ffffffff810e7ef6&gt;] do_kern_mount+0x48/0xe8
 [&lt;ffffffff810fdf68&gt;] do_mount+0x771/0x7e8
 [&lt;ffffffff810fe062&gt;] sys_mount+0x83/0xbd
 [&lt;ffffffff810089c2&gt;] system_call_fastpath+0x16/0x1b

The reason of this hang was a race condition: when the flusher thread is
forking a bdi thread, we use 'kthread_run()', so we run it _before_ we make it
visible in 'bdi-&gt;wb.task'. The bdi thread runs, does all works, and goes sleep.
'bdi-&gt;wb.task' is still NULL. And this is a dangerous time window.

If at this time someone queues a work for this bdi, he does not see the bdi
thread and wakes up the forker thread instead! But the forker has already
forked this bdi thread, but just did not make it visible yet!

The result is that we lose the wake up event for this bdi thread and the NFS4
code waits forever.

To fix the problem, we should use 'ktrhead_create()' for creating bdi threads,
then make them visible in 'bdi-&gt;wb.task', and only after this wake them up.
This is exactly what this patch does.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>writeback: avoid unnecessary calculation of bdi dirty thresholds</title>
<updated>2010-08-12T15:43:29Z</updated>
<author>
<name>Wu Fengguang</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2010-08-11T21:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16c4042f08919f447d6b2a55679546c9b97c7264'/>
<id>urn:sha1:16c4042f08919f447d6b2a55679546c9b97c7264</id>
<content type='text'>
Split get_dirty_limits() into global_dirty_limits()+bdi_dirty_limit(), so
that the latter can be avoided when under global dirty background
threshold (which is the normal state for most systems).

Signed-off-by: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&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: fix bad _bh spinlock nesting</title>
<updated>2010-08-07T16:53:57Z</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-08-04T11:34:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6bf05d03ea8d00bb53e0642f94a5a6815be2edb6'/>
<id>urn:sha1:6bf05d03ea8d00bb53e0642f94a5a6815be2edb6</id>
<content type='text'>
Fix a bug where a lock is _bh nested within another _bh lock,
but forgets to use the _bh variant for unlock.

Further more, it's not necessary to test _bh locks, the inner lock
can just use spin_lock(). So fix up the bug by making that change.

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>writeback: cleanup bdi_register</title>
<updated>2010-08-07T16:53:57Z</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-07-25T11:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c284de61db31669cce547ffc99efda971146719d'/>
<id>urn:sha1:c284de61db31669cce547ffc99efda971146719d</id>
<content type='text'>
This patch makes sure we first initialize everything and set the BDI_registered
flag, and only after this we add the bdi to 'bdi_list'. Current code adds the
bdi to the list too early, and as a result I the

WARN(!test_bit(BDI_registered, &amp;bdi-&gt;state)

in bdi forker is triggered. Also, it is in general good practice to make things
visible only when they are fully initialized.

Also, this patch does few micro clean-ups:
1. Removes the 'exit' label which does not do anything, just returns. This
   allows to get rid of few braces and 'ret' variable and make the code smaller.
2. If 'kthread_run()' fails, remove the error code it returns, not hard-coded
   '-ENOMEM'. Theoretically, some day 'kthread_run()' can return something
   else. Also, in case of failure it is not necessary to set 'bdi-&gt;wb.task' to
   NULL.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
</feed>
