android_kernel_xiaomi_sm7250/drivers/block
Tejun Heo c995905916 block: fix diskstats access
There are two variants of stat functions - ones prefixed with double
underbars which don't care about preemption and ones without which
disable preemption before manipulating per-cpu counters.  It's unclear
whether the underbarred ones assume that preemtion is disabled on
entry as some callers don't do that.

This patch unifies diskstats access by implementing disk_stat_lock()
and disk_stat_unlock() which take care of both RCU (for partition
access) and preemption (for per-cpu counter access).  diskstats access
should always be enclosed between the two functions.  As such, there's
no need for the versions which disables preemption.  They're removed
and double underbars ones are renamed to drop the underbars.  As an
extra argument is added, there's no danger of using the old version
unconverted.

disk_stat_lock() uses get_cpu() and returns the cpu index and all
diskstat functions which access per-cpu counters now has @cpu
argument to help RT.

This change adds RCU or preemption operations at some places but also
collapses several preemption ops into one at others.  Overall, the
performance difference should be negligible as all involved ops are
very lightweight per-cpu ones.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-10-09 08:56:06 +02:00
..
aoe block: fix diskstats access 2008-10-09 08:56:06 +02:00
paride device create: block: convert device_create to device_create_drvdata 2008-07-21 21:54:41 -07:00
amiflop.c m68k: Return -ENODEV if no device is found 2008-05-18 13:28:50 -07:00
ataflop.c m68k: Return -ENODEV if no device is found 2008-07-20 17:24:38 -07:00
brd.c brd: fix name argument of unregister_blkdev() 2008-08-20 15:40:30 -07:00
cciss_cmd.h
cciss_scsi.c cciss: add support for multi lun tape devices 2008-08-06 12:30:04 +02:00
cciss_scsi.h
cciss.c cciss: fix bug if scsi tape support is disabled 2008-08-06 12:30:04 +02:00
cciss.h cciss: make rebuild_lun_table behave better 2008-08-06 12:30:03 +02:00
cpqarray.c proc: remove proc_root_driver 2008-04-29 08:06:18 -07:00
cpqarray.h
cryptoloop.c
DAC960.c DAC960: push down BKL 2008-07-04 09:52:13 +02:00
DAC960.h
floppy.c
hd.c hd.c: remove the #include <linux/mc146818rtc.h> 2008-07-16 20:33:48 +02:00
ida_cmd.h
ida_ioctl.h
Kconfig update the BLK_DEV_HD help text 2008-07-16 20:33:47 +02:00
loop.c
Makefile move ide/legacy/hd.c to drivers/block/ 2008-07-16 20:33:47 +02:00
nbd.c nbd: fix memory leak of nbd_dev array 2008-08-20 15:40:30 -07:00
pktcdvd.c block: don't depend on consecutive minor space 2008-10-09 08:56:05 +02:00
ps3disk.c block: don't depend on consecutive minor space 2008-10-09 08:56:05 +02:00
smart1,2.h
sunvdc.c
swim3.c
sx8.c
ub.c ub: Cosmetics 2008-05-02 10:25:52 -07:00
umem.c
umem.h
viodasd.c [POWERPC] iSeries: Remove unused mail address 2008-05-23 16:45:04 +10:00
virtio_blk.c virtio_blk: use a wrapper function to access io context information of IO requests 2008-10-09 08:56:02 +02:00
xd.c
xd.h
xen-blkfront.c xen-blkfront.c: make blkif_ioctl() static 2008-08-06 12:30:04 +02:00
xsysace.c
z2ram.c m68k: Return -ENODEV if no device is found 2008-05-18 13:28:50 -07:00