<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/btrfs/async-thread.c, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Btrfs: convert nested spin_lock_irqsave to spin_lock</title>
<updated>2009-07-22T20:49:00+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2009-07-22T20:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=29c5e8ce01f9dad7e24b99c21e4f836d6b0289e0'/>
<id>29c5e8ce01f9dad7e24b99c21e4f836d6b0289e0</id>
<content type='text'>
If spin_lock_irqsave is called twice in a row with the same second
argument, the interrupt state at the point of the second call overwrites
the value saved by the first call.  Indeed, the second call does not need
to save the interrupt state, so it is changed to a simple spin_lock.

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If spin_lock_irqsave is called twice in a row with the same second
argument, the interrupt state at the point of the second call overwrites
the value saved by the first call.  Indeed, the second call does not need
to save the interrupt state, so it is changed to a simple spin_lock.

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix use after free in btrfs_start_workers fail path</title>
<updated>2009-07-02T17:50:58+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2009-07-02T17:50:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9b627e9bf49ebfeb060dfae0435bdba06cf27cb8'/>
<id>9b627e9bf49ebfeb060dfae0435bdba06cf27cb8</id>
<content type='text'>
worker memory is already freed on one fail path in btrfs_start_workers,
but is still dereferenced. Switch the dereference and kfree.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
worker memory is already freed on one fail path in btrfs_start_workers,
but is still dereferenced. Switch the dereference and kfree.

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: init worker struct fields before kthread-run</title>
<updated>2009-06-11T00:11:29+00:00</updated>
<author>
<name>Shin Hong</name>
<email>hongshin@gmail.com</email>
</author>
<published>2009-06-11T00:11:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fd0fb038d5a308c7faddd1701be5e70aaffec98b'/>
<id>fd0fb038d5a308c7faddd1701be5e70aaffec98b</id>
<content type='text'>
This patch fixes a bug which may result race condition
between btrfs_start_workers() and worker_loop().

btrfs_start_workers() executed in a parent thread writes
on workers-&gt;worker and worker_loop() in a child thread
reads workers-&gt;worker. However, there is no synchronization
enforcing the order of two operations.

This patch makes btrfs_start_workers() fill workers-&gt;worker
before it starts a child thread with worker_loop()

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a bug which may result race condition
between btrfs_start_workers() and worker_loop().

btrfs_start_workers() executed in a parent thread writes
on workers-&gt;worker and worker_loop() in a child thread
reads workers-&gt;worker. However, there is no synchronization
enforcing the order of two operations.

This patch makes btrfs_start_workers() fill workers-&gt;worker
before it starts a child thread with worker_loop()

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: add a priority queue to the async thread helpers</title>
<updated>2009-04-20T19:53:08+00:00</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2009-04-20T19:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d313d7a31a752c88f7288692bd98e66d0789779b'/>
<id>d313d7a31a752c88f7288692bd98e66d0789779b</id>
<content type='text'>
Btrfs is using WRITE_SYNC_PLUG to send down synchronous IOs with a
higher priority.  But, the checksumming helper threads prevent it
from being fully effective.

There are two problems.  First, a big queue of pending checksumming
will delay the synchronous IO behind other lower priority writes.  Second,
the checksumming uses an ordered async work queue.  The ordering makes sure
that IOs are sent to the block layer in the same order they are sent
to the checksumming threads.  Usually this gives us less seeky IO.

But, when we start mixing IO priorities, the lower priority IO can delay
the higher priority IO.

This patch solves both problems by adding a high priority list to the async
helper threads, and a new btrfs_set_work_high_prio(), which is used
to make put a new async work item onto the higher priority list.

The ordering is still done on high priority IO, but all of the high
priority bios are ordered separately from the low priority bios.  This
ordering is purely an IO optimization, it is not involved in data
or metadata integrity.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Btrfs is using WRITE_SYNC_PLUG to send down synchronous IOs with a
higher priority.  But, the checksumming helper threads prevent it
from being fully effective.

There are two problems.  First, a big queue of pending checksumming
will delay the synchronous IO behind other lower priority writes.  Second,
the checksumming uses an ordered async work queue.  The ordering makes sure
that IOs are sent to the block layer in the same order they are sent
to the checksumming threads.  Usually this gives us less seeky IO.

But, when we start mixing IO priorities, the lower priority IO can delay
the higher priority IO.

This patch solves both problems by adding a high priority list to the async
helper threads, and a new btrfs_set_work_high_prio(), which is used
to make put a new async work item onto the higher priority list.

The ordering is still done on high priority IO, but all of the high
priority bios are ordered separately from the low priority bios.  This
ordering is purely an IO optimization, it is not involved in data
or metadata integrity.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: remove unused ftrace include</title>
<updated>2009-04-02T21:02:55+00:00</updated>
<author>
<name>Jim Owens</name>
<email>jowens@hp.com</email>
</author>
<published>2009-04-02T21:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2e966ed22c3c56227f8a7322d7b008945352e6ab'/>
<id>2e966ed22c3c56227f8a7322d7b008945352e6ab</id>
<content type='text'>
Signed-off-by: jim owens &lt;jowens@hp.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: jim owens &lt;jowens@hp.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix race in worker_loop</title>
<updated>2009-04-02T21:01:27+00:00</updated>
<author>
<name>Amit Gud</name>
<email>amitgud@gmail.com</email>
</author>
<published>2009-04-02T21:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b5555f77115bfba3630fefff2d4e68140b644171'/>
<id>b5555f77115bfba3630fefff2d4e68140b644171</id>
<content type='text'>
Need to check kthread_should_stop after schedule_timeout() before calling
schedule(). This causes threads to sleep with potentially no one to wake them
up causing mount(2) to hang in btrfs_stop_workers waiting for threads to stop.

Signed-off-by: Amit Gud &lt;gud@ksu.edu&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Need to check kthread_should_stop after schedule_timeout() before calling
schedule(). This causes threads to sleep with potentially no one to wake them
up causing mount(2) to hang in btrfs_stop_workers waiting for threads to stop.

Signed-off-by: Amit Gud &lt;gud@ksu.edu&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: async threads should try harder to find work</title>
<updated>2009-02-04T14:23:24+00:00</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2009-02-04T14:23:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b51912c91fcf7581cc7b4550f1bb96422809d9ed'/>
<id>b51912c91fcf7581cc7b4550f1bb96422809d9ed</id>
<content type='text'>
Tracing shows the delay between when an async thread goes to sleep
and when more work is added is often very short.  This commit adds
a little bit of delay and extra checking to the code right before
we schedule out.

It allows more work to be added to the worker
without requiring notifications from other procs.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tracing shows the delay between when an async thread goes to sleep
and when more work is added is often very short.  This commit adds
a little bit of delay and extra checking to the code right before
we schedule out.

It allows more work to be added to the worker
without requiring notifications from other procs.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: Catch missed bios in the async bio submission thread</title>
<updated>2009-02-04T14:19:41+00:00</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2009-02-04T14:19:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a68370515356a3eddbfaf7f56418b3cf85d76c2c'/>
<id>a68370515356a3eddbfaf7f56418b3cf85d76c2c</id>
<content type='text'>
The async bio submission thread was missing some bios that were
added after it had decided there was no work left to do.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The async bio submission thread was missing some bios that were
added after it had decided there was no work left to do.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: removed unused #include &lt;version.h&gt;'s</title>
<updated>2009-01-21T15:49:16+00:00</updated>
<author>
<name>Huang Weiyi</name>
<email>weiyi.huang@gmail.com</email>
</author>
<published>2009-01-21T15:49:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7eaebe7d503c3ef240ac7b3efc5433fe647c0298'/>
<id>7eaebe7d503c3ef240ac7b3efc5433fe647c0298</id>
<content type='text'>
Removed unused #include &lt;version.h&gt;'s in btrfs

Signed-off-by: Huang Weiyi &lt;weiyi.huang@gmail.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed unused #include &lt;version.h&gt;'s in btrfs

Signed-off-by: Huang Weiyi &lt;weiyi.huang@gmail.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: Fix checkpatch.pl warnings</title>
<updated>2009-01-06T02:25:51+00:00</updated>
<author>
<name>Chris Mason</name>
<email>chris.mason@oracle.com</email>
</author>
<published>2009-01-06T02:25:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d397712bcc6a759a560fd247e6053ecae091f958'/>
<id>d397712bcc6a759a560fd247e6053ecae091f958</id>
<content type='text'>
There were many, most are fixed now.  struct-funcs.c generates some warnings
but these are bogus.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were many, most are fixed now.  struct-funcs.c generates some warnings
but these are bogus.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
