diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2011-05-29 13:03:02 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-05-29 13:03:02 +0100 |
commit | 4cc1b4cffd187a5c5d6264c8d766c49b3c57fb05 (patch) | |
tree | 98b550b7e3c00fcdf20cc8b0a9c5b9478cb45ac9 /lib/bug.c | |
parent | c6ea41fbbe08f270a8edef99dc369faf809d1bd6 (diff) | |
download | kernel_samsung_smdk4412-4cc1b4cffd187a5c5d6264c8d766c49b3c57fb05.zip kernel_samsung_smdk4412-4cc1b4cffd187a5c5d6264c8d766c49b3c57fb05.tar.gz kernel_samsung_smdk4412-4cc1b4cffd187a5c5d6264c8d766c49b3c57fb05.tar.bz2 |
dm kcopyd: remove superfluous page allocation spinlock
Remove the spinlock protecting the pages allocation. The spinlock is only
taken on initialization or from single-threaded workqueue. Therefore, the
spinlock is useless.
The spinlock is taken in kcopyd_get_pages and kcopyd_put_pages.
kcopyd_get_pages is only called from run_pages_job, which is only
called from process_jobs called from do_work.
kcopyd_put_pages is called from client_alloc_pages (which is initialization
function) or from run_complete_job. run_complete_job is only called from
process_jobs called from do_work.
Another spinlock, kc->job_lock is taken each time someone pushes or pops
some work for the worker thread. Once we take kc->job_lock, we
guarantee that any written memory is visible to the other CPUs.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'lib/bug.c')
0 files changed, 0 insertions, 0 deletions