-------- Forwarded Message --------
Subject: max_unmap_lba_count too large by default
Date: Thu, 27 Aug 2015 16:47:48 +0200
From: Tomasz Charoński <t.charonski(a)beyond.pl>
To: targetcli-fb-devel-bounces(a)lists.fedorahosted.org
Hello,
the attribute max_unmap_lba_count of iblock backstore (maybe in other
backstores too) is definitely too large by default: 4194304. It allows
SCSI to accept so big SCSI unmap commands, that target eventually ends
with timeout, because backend storage processes it too long:
Aug 17 09:51:01 debian8 kernel: [330755.353723] INFO: task
kworker/10:1:5423 blocked for more than 120 seconds.
Aug 17 09:51:01 debian8 kernel: [330755.353773] Tainted:
P O 4.0.4 #1
Aug 17 09:51:01 debian8 kernel: [330755.353807] "echo 0 >
/proc/sys/kernel/hung_task_timeout_secs" disables this message.
Aug 17 09:51:01 debian8 kernel: [330755.353867] kworker/10:1 D
ffff88203f014440 0 5423 2 0x00000000
Aug 17 09:51:01 debian8 kernel: [330755.353884] Workqueue:
tcm_qla2xxx_free tcm_qla2xxx_handle_data_work [tcm_qla2xxx]
Aug 17 09:51:01 debian8 kernel: [330755.353888] ffff882021f722d0
ffff88149219fbf8 ffff881038c7a190 0000000000000001
Aug 17 09:51:01 debian8 kernel: [330755.353893] ffff88149219ffd8
ffff88203f014440 7fffffffffffffff ffff882021f722d0
Aug 17 09:51:01 debian8 kernel: [330755.353896] ffff88149219fcd0
0000000000000000 ffffffff815640cf 0000000000000000
Aug 17 09:51:01 debian8 kernel: [330755.353901] Call Trace:
Aug 17 09:51:01 debian8 kernel: [330755.353918] [<ffffffff815640cf>] ?
schedule+0x2f/0x80
Aug 17 09:51:01 debian8 kernel: [330755.353924] [<ffffffff8156744a>] ?
schedule_timeout+0x21a/0x290
Aug 17 09:51:01 debian8 kernel: [330755.353936] [<ffffffff812a5eaf>] ?
generic_make_request_checks+0x1df/0x3d0
Aug 17 09:51:01 debian8 kernel: [330755.353947] [<ffffffff8101cf75>] ?
read_tsc+0x5/0x10
Aug 17 09:51:01 debian8 kernel: [330755.353952] [<ffffffff815636ea>] ?
io_schedule_timeout+0xba/0x150
Aug 17 09:51:01 debian8 kernel: [330755.353957] [<ffffffff81564ab5>] ?
wait_for_completion_io+0xb5/0x180
Aug 17 09:51:01 debian8 kernel: [330755.353967] [<ffffffff81098fa0>] ?
wake_up_state+0x20/0x20
Aug 17 09:51:01 debian8 kernel: [330755.353973] [<ffffffff812b0fab>] ?
blkdev_issue_discard+0x20b/0x270
Aug 17 09:51:01 debian8 kernel: [330755.353983] [<ffffffffa0543270>] ?
iblock_execute_unmap+0x30/0x30 [target_core_iblock]
Aug 17 09:51:01 debian8 kernel: [330755.353988] [<ffffffffa054328f>] ?
iblock_do_unmap+0x1f/0x50 [target_core_iblock]
Aug 17 09:51:01 debian8 kernel: [330755.354003] [<ffffffffa07af65c>] ?
sbc_execute_unmap+0x12c/0x270 [target_core_mod]
Aug 17 09:51:01 debian8 kernel: [330755.354010] [<ffffffff810125eb>] ?
__switch_to+0x14b/0x5d0
Aug 17 09:51:01 debian8 kernel: [330755.354020] [<ffffffffa07ac4aa>] ?
__target_execute_cmd+0x1a/0xa0 [target_core_mod]
Aug 17 09:51:01 debian8 kernel: [330755.354026] [<ffffffff81086a02>] ?
process_one_work+0x152/0x440
Aug 17 09:51:01 debian8 kernel: [330755.354031] [<ffffffff8108757b>] ?
worker_thread+0x6b/0x560
Aug 17 09:51:01 debian8 kernel: [330755.354035] [<ffffffff81087510>] ?
rescuer_thread+0x3b0/0x3b0
Aug 17 09:51:01 debian8 kernel: [330755.354041] [<ffffffff8108c533>] ?
kthread+0xd3/0xf0
Aug 17 09:51:01 debian8 kernel: [330755.354045] [<ffffffff8108c460>] ?
kthread_create_on_node+0x180/0x180
Aug 17 09:51:01 debian8 kernel: [330755.354050] [<ffffffff81568798>] ?
ret_from_fork+0x58/0x90
Aug 17 09:51:01 debian8 kernel: [330755.354054] [<ffffffff8108c460>] ?
kthread_create_on_node+0x180/0x180
To prevent such timeouts I suggest to set max_unmap_lba_count by default
to 65535.
Best regards,
--
Tomasz Charoński
Storage Administrator
Ul. M. Palacza 113
60-273 Poznań
tel.: +48 61 859 70 07
fax: +48 61 623 25 79
www.beyond.pl <
http://www.beyond.pl>
biuro(a)beyond.pl <mailto:biuro@beyond.pl>
NIP: 782-23-24-152
KRS: 0000237620
Sąd Rejonowy Poznań-Nowe Miasto i Wilda w Poznaniu
VIII Wydział Gospodarczy Krajowego Rejestru Sądowego
Kapitał Zakładowy: 2 539 700,00 PLN
UWAGA: Ta wiadomość oraz wszelkie załączniki są przeznaczone wyłącznie
dla adresata korespondencji e-mail. Jeśli otrzymałeś ten e-mail przez
pomyłkę, prosimy niezwłocznie powiadom nadawcę i usuń przesyłkę ze
swojego systemu wraz ze wszystkimi załącznikami. Kopiowanie,
dystrybucja, ujawnianie i inne wykorzystanie przesyłki e-mail, bez zgody
nadawcy, jest zakazane.