<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/lib/percpu_counter.c, branch linux-2.6.27.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-12-09T21:24:15Z</updated>
<entry>
<title>percpu: fix list_head init bug in __percpu_counter_init()</title>
<updated>2010-12-09T21:24:15Z</updated>
<author>
<name>Masanori ITOH</name>
</author>
<published>2010-10-26T21:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8123c0be8dd7204cbbe7080b3049169d86c10a01'/>
<id>urn:sha1:8123c0be8dd7204cbbe7080b3049169d86c10a01</id>
<content type='text'>
commit 8474b591faf3bb0a1e08a60d21d6baac498f15e4 upstream.

WARNING: at lib/list_debug.c:26 __list_add+0x3f/0x81()
Hardware name: Express5800/B120a [N8400-085]
list_add corruption. next-&gt;prev should be prev (ffffffff81a7ea00), but was dead000000200200. (next=ffff88080b872d58).
Modules linked in: aoe ipt_MASQUERADE iptable_nat nf_nat autofs4 sunrpc bridge 8021q garp stp llc ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_round_robin dm_multipath kvm_intel kvm uinput lpfc scsi_transport_fc igb ioatdma scsi_tgt i2c_i801 i2c_core dca iTCO_wdt iTCO_vendor_support pcspkr shpchp megaraid_sas [last unloaded: aoe]
Pid: 54, comm: events/3 Tainted: G        W  2.6.34-vanilla1 #1
Call Trace:
[&lt;ffffffff8104bd77&gt;] warn_slowpath_common+0x7c/0x94
[&lt;ffffffff8104bde6&gt;] warn_slowpath_fmt+0x41/0x43
[&lt;ffffffff8120fd2e&gt;] __list_add+0x3f/0x81
[&lt;ffffffff81212a12&gt;] __percpu_counter_init+0x59/0x6b
[&lt;ffffffff810d8499&gt;] bdi_init+0x118/0x17e
[&lt;ffffffff811f2c50&gt;] blk_alloc_queue_node+0x79/0x143
[&lt;ffffffff811f2d2b&gt;] blk_alloc_queue+0x11/0x13
[&lt;ffffffffa02a931d&gt;] aoeblk_gdalloc+0x8e/0x1c9 [aoe]
[&lt;ffffffffa02aa655&gt;] aoecmd_sleepwork+0x25/0xa8 [aoe]
[&lt;ffffffff8106186c&gt;] worker_thread+0x1a9/0x237
[&lt;ffffffffa02aa630&gt;] ? aoecmd_sleepwork+0x0/0xa8 [aoe]
[&lt;ffffffff81065827&gt;] ? autoremove_wake_function+0x0/0x39
[&lt;ffffffff810616c3&gt;] ? worker_thread+0x0/0x237
[&lt;ffffffff810653ad&gt;] kthread+0x7f/0x87
[&lt;ffffffff8100aa24&gt;] kernel_thread_helper+0x4/0x10
[&lt;ffffffff8106532e&gt;] ? kthread+0x0/0x87
[&lt;ffffffff8100aa20&gt;] ? kernel_thread_helper+0x0/0x10

It's because there is no initialization code for a list_head contained in
the struct backing_dev_info under CONFIG_HOTPLUG_CPU, and the bug comes up
when block device drivers calling blk_alloc_queue() are used.  In case of
me, I got them by using aoe.

Signed-off-by: Masanori Itoh &lt;itoumsn@nttdata.co.jp&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>percpu counter: clean up percpu_counter_sum_and_set()</title>
<updated>2010-05-26T21:27:05Z</updated>
<author>
<name>Mingming Cao</name>
</author>
<published>2010-03-16T00:25:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac6016e3a8c7967cf8e3fe9102a9b87d7092b4bf'/>
<id>urn:sha1:ac6016e3a8c7967cf8e3fe9102a9b87d7092b4bf</id>
<content type='text'>
commit 1f7c14c62ce63805f9574664a6c6de3633d4a354 upstream.

percpu_counter_sum_and_set() and percpu_counter_sum() is the same except
the former updates the global counter after accounting.  Since we are
taking the fbc-&gt;lock to calculate the precise value of the counter in
percpu_counter_sum() anyway, it should simply set fbc-&gt;count too, as the
percpu_counter_sum_and_set() does.

This patch merges these two interfaces into one.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Signed-off-by: Jayson R. King &lt;dev@jaysonking.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;

</content>
</entry>
<entry>
<title>percpu_counter: new function percpu_counter_sum_and_set</title>
<updated>2008-07-11T23:27:31Z</updated>
<author>
<name>Mingming Cao</name>
</author>
<published>2008-07-11T23:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8ced39d5e8911c662d4d69a342b9d053eaaac4e'/>
<id>urn:sha1:e8ced39d5e8911c662d4d69a342b9d053eaaac4e</id>
<content type='text'>
Delayed allocation need to check free blocks at every write time.
percpu_counter_read_positive() is not quit accurate. delayed
allocation need a more accurate accounting, but using
percpu_counter_sum_positive() is frequently is quite expensive.

This patch added a new function to update center counter when sum
per-cpu counter, to increase the accurate rate for next
percpu_counter_read() and require less calling expensive
percpu_counter_sum().

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;

</content>
</entry>
<entry>
<title>mm: bdi: export BDI attributes in sysfs</title>
<updated>2008-04-30T15:29:49Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2008-04-30T07:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf0ca9fe5dd9e3693d935757a7b2fc50fc576554'/>
<id>urn:sha1:cf0ca9fe5dd9e3693d935757a7b2fc50fc576554</id>
<content type='text'>
Provide a place in sysfs (/sys/class/bdi) for the backing_dev_info object.
This allows us to see and set the various BDI specific variables.

In particular this properly exposes the read-ahead window for all relevant
users and /sys/block/&lt;block&gt;/queue/read_ahead_kb should be deprecated.

With patient help from Kay Sievers and Greg KH

[mszeredi@suse.cz]

 - split off NFS and FUSE changes into separate patches
 - document new sysfs attributes under Documentation/ABI
 - do bdi_class_init as a core_initcall, otherwise the "default" BDI
   won't be initialized
 - remove bdi_init_fmt macro, it's not used very much

[akpm@linux-foundation.org: fix ia64 warning]
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Acked-by: Greg KH &lt;greg@kroah.com&gt;
Cc: Trond Myklebust &lt;trond.myklebust@fys.uio.no&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&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>Add irq protection in the percpu-counters cpu-hotplug-callback path</title>
<updated>2007-10-19T18:53:44Z</updated>
<author>
<name>Gautham R Shenoy</name>
</author>
<published>2007-10-19T06:40:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2b20b11547cefc89d6c81937e81afaf3c62808b'/>
<id>urn:sha1:d2b20b11547cefc89d6c81937e81afaf3c62808b</id>
<content type='text'>
Some of the per-cpu counters and thus their locks are accessed from IRQ
contexts.  This can cause a deadlock if it interrupts a cpu-offline thread
which is transferring a dead-cpu's counts to the global counter.

Add appropriate IRQ protection in the cpu-hotplug callback path.

Signed-off-by: Gautham R Shenoy &lt;ego@in.ibm.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.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>lib: percpu_counter_init_irq</title>
<updated>2007-10-17T15:42:44Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2007-10-17T06:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc62a30e274d003a4d08fb888f1520add4b21373'/>
<id>urn:sha1:dc62a30e274d003a4d08fb888f1520add4b21373</id>
<content type='text'>
provide a way to tell lockdep about percpu_counters that are supposed to be
used from irq safe contexts.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>lib: percpu_counter_init error handling</title>
<updated>2007-10-17T15:42:44Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2007-10-17T06:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=833f4077bf7c2dcff6e31526e03ec2ad91c88581'/>
<id>urn:sha1:833f4077bf7c2dcff6e31526e03ec2ad91c88581</id>
<content type='text'>
alloc_percpu can fail, propagate that error.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>lib: percpu_count_sum()</title>
<updated>2007-10-17T15:42:44Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2007-10-17T06:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf1d89c81352f6eca72d0c10cfee3dba29ef5efb'/>
<id>urn:sha1:bf1d89c81352f6eca72d0c10cfee3dba29ef5efb</id>
<content type='text'>
Provide an accurate version of percpu_counter_read.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>lib: percpu_counter_sum_positive</title>
<updated>2007-10-17T15:42:44Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2007-10-17T06:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52d9f3b4090922f34497ace82bd062d80a465a29'/>
<id>urn:sha1:52d9f3b4090922f34497ace82bd062d80a465a29</id>
<content type='text'>
 s/percpu_counter_sum/&amp;_positive/

Because its consitent with percpu_counter_read*

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>lib: percpu_counter_set</title>
<updated>2007-10-17T15:42:44Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2007-10-17T06:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a587f47b82f96f19318c036e7b979fcd5c3848f'/>
<id>urn:sha1:3a587f47b82f96f19318c036e7b979fcd5c3848f</id>
<content type='text'>
Provide a method to set a percpu counter to a specified value.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>
</feed>
