- Fixes BUG: scheduling while atomic

- Removes nested allocation, because MAX_LOCKDEP_SUBCLASSES isn't sufficiently high in many cases
 - Size for mempools for UAs and sense buffers



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@796 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2009-04-24 13:16:38 +00:00
parent cfb897c6c1
commit 22eb47e455
2 changed files with 12 additions and 10 deletions

View File

@@ -522,8 +522,8 @@ static void scst_queue_report_luns_changed_UA(struct scst_session *sess,
list_for_each_entry(tgt_dev, shead,
sess_tgt_dev_list_entry) {
spin_lock_nested(&tgt_dev->tgt_dev_lock,
tgt_dev->lun);
/* Lockdep triggers here a false positive.. */
spin_lock(&tgt_dev->tgt_dev_lock);
}
}
@@ -3501,8 +3501,8 @@ again:
struct scst_tgt_dev *tgt_dev;
list_for_each_entry(tgt_dev, sess_tgt_dev_list_head,
sess_tgt_dev_list_entry) {
spin_lock_nested(&tgt_dev->tgt_dev_lock,
tgt_dev->lun);
/* Lockdep triggers here a false positive.. */
spin_lock(&tgt_dev->tgt_dev_lock);
}
}
@@ -3560,7 +3560,7 @@ out_unlock:
struct scst_tgt_dev *tgt_dev;
list_for_each_entry_reverse(tgt_dev, sess_tgt_dev_list_head,
sess_tgt_dev_list_entry) {
spin_unlock_bh(&tgt_dev->tgt_dev_lock);
spin_unlock(&tgt_dev->tgt_dev_lock);
}
}

View File

@@ -1777,6 +1777,11 @@ static int __init init_scst(void)
goto out_destroy_acg_cache;
}
/*
* All mgmt stubs, UAs and sense buffers are bursty and loosing them
* may have fatal consequences, so let's have big pools for them.
*/
scst_mgmt_stub_mempool = mempool_create(1024, mempool_alloc_slab,
mempool_free_slab, scst_mgmt_stub_cachep);
if (scst_mgmt_stub_mempool == NULL) {
@@ -1784,17 +1789,14 @@ static int __init init_scst(void)
goto out_destroy_mgmt_mempool;
}
scst_ua_mempool = mempool_create(64, mempool_alloc_slab,
scst_ua_mempool = mempool_create(512, mempool_alloc_slab,
mempool_free_slab, scst_ua_cachep);
if (scst_ua_mempool == NULL) {
res = -ENOMEM;
goto out_destroy_mgmt_stub_mempool;
}
/*
* Loosing sense may have fatal consequences, so let's have a big pool
*/
scst_sense_mempool = mempool_create(128, mempool_alloc_slab,
scst_sense_mempool = mempool_create(1024, mempool_alloc_slab,
mempool_free_slab, scst_sense_cachep);
if (scst_sense_mempool == NULL) {
res = -ENOMEM;