summaryrefslogtreecommitdiff
path: root/lib/kasprintf.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2011-05-19 19:38:30 (GMT)
committerJens Axboe <jaxboe@fusionio.com>2011-05-20 18:34:53 (GMT)
commitf0bdc8cdd9a2bcc2c84ae2a1fdbff4188b354d8d (patch)
tree6d34ecec4cfc29c6032a7b6ce1acbb61088d1787 /lib/kasprintf.c
parent575969a0dd3fe65c6556bcb8f87c42303326ea55 (diff)
downloadlinux-fsl-qoriq-f0bdc8cdd9a2bcc2c84ae2a1fdbff4188b354d8d.tar.xz
blk-cgroup: Make cgroup stat reset path blkg->lock free for dispatch stats
Now dispatch stats update is lock free. But reset of these stats still takes blkg->stats_lock and is dependent on that. As stats are per cpu, we should be able to just reset the stats on each cpu without any locks. (Atleast for 64bit arch). On 32bit arch there is a small race where 64bit updates are not atomic. The result of this race can be that in the presence of other writers, one might not get 0 value after reset of a stat and might see something intermediate One can write more complicated code to cover this race like sending IPI to other cpus to reset stats and for offline cpus, reset these directly. Right not I am not taking that path because reset_update is more of a debug feature and it can happen only on 32bit arch and possibility of it happening is small. Will fix it if it becomes a real problem. For the time being going for code simplicity. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'lib/kasprintf.c')
0 files changed, 0 insertions, 0 deletions