Kyle Fortin
bfcc62ed70
scsi: libiscsi: use kvzalloc for iscsi_pool_init
iscsiadm session login can fail with the following error:
iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com...
iscsiadm: initiator reported error (9 - internal error)
When /etc/iscsi/iscsid.conf sets node.session.cmds_max = 4096, it
results in 64K-sized kmallocs per session. A system under fragmented
slab pressure may not have any 64K objects available and fail iscsiadm
session login. Even though memory objects of a smaller size are
available, the large order allocation ends up failing.
The kernel prints a warning and does dump_stack, like below:
iscsid: page allocation failure: order:4, mode:0xc0d0
CPU: 0 PID: 2456 Comm: iscsid Not tainted 4.1.12-61.1.28.el6uek.x86_64 #2
Call Trace:
[<ffffffff816c6e40>] dump_stack+0x63/0x83
[<ffffffff8118e58a>] warn_alloc_failed+0xea/0x140
[<ffffffff81191df9>] __alloc_pages_slowpath+0x409/0x760
[<ffffffff81192401>] __alloc_pages_nodemask+0x2b1/0x2d0
[<ffffffffa048f6c0>] ? dev_attr_host_ipaddress+0x20/0xffffffffffffc722
[<ffffffff811dc38f>] alloc_pages_current+0xaf/0x170
[<ffffffff81192581>] alloc_kmem_pages+0x31/0xd0
[<ffffffffa048f600>] ? iscsi_transport_group+0x20/0xffffffffffffc7e2
[<ffffffff811ad738>] kmalloc_order+0x18/0x50
[<ffffffff811ad7a4>] kmalloc_order_trace+0x34/0xe0
[<ffffffff8146ee30>] ? transport_remove_classdev+0x70/0x70
[<ffffffff811e843d>] __kmalloc+0x27d/0x2a0
[<ffffffff810c8cbd>] ? complete_all+0x4d/0x60
[<ffffffffa04af299>] iscsi_pool_init+0x69/0x160 [libiscsi]
[<ffffffff81465d90>] ? device_initialize+0xb0/0xd0
[<ffffffffa04af510>] iscsi_session_setup+0x180/0x2f4 [libiscsi]
[<ffffffffa04c5a60>] ? iscsi_max_lun+0x20/0xfffffffffffffa9e [iscsi_tcp]
[<ffffffffa04c531f>] iscsi_sw_tcp_session_create+0xcf/0x150 [iscsi_tcp]
[<ffffffffa04c5a60>] ? iscsi_max_lun+0x20/0xfffffffffffffa9e [iscsi_tcp]
[<ffffffffa048a633>] iscsi_if_create_session+0x33/0xd0
[<ffffffffa04c5a60>] ? iscsi_max_lun+0x20/0xfffffffffffffa9e [iscsi_tcp]
[<ffffffffa048abd8>] iscsi_if_recv_msg+0x508/0x8c0 [scsi_transport_iscsi]
[<ffffffff811922eb>] ? __alloc_pages_nodemask+0x19b/0x2d0
[<ffffffff811e6d69>] ? __kmalloc_node_track_caller+0x209/0x2c0
[<ffffffffa048b00c>] iscsi_if_rx+0x7c/0x200 [scsi_transport_iscsi]
[<ffffffff81623dc6>] netlink_unicast+0x126/0x1c0
[<ffffffff8162468c>] netlink_sendmsg+0x36c/0x400
[<ffffffff815d2fed>] sock_sendmsg+0x4d/0x60
[<ffffffff815d596a>] ___sys_sendmsg+0x30a/0x330
[<ffffffff811bc72c>] ? handle_pte_fault+0x20c/0x230
[<ffffffff811bc90c>] ? __handle_mm_fault+0x1bc/0x330
[<ffffffff811bcb32>] ? handle_mm_fault+0xb2/0x1a0
[<ffffffff815d5b99>] __sys_sendmsg+0x49/0x90
[<ffffffff815d5bf9>] SyS_sendmsg+0x19/0x20
[<ffffffff816cbb2e>] system_call_fastpath+0x12/0x71
Use kvzalloc for iscsi_pool in iscsi_pool_init.
Signed-off-by: Kyle Fortin <kyle.fortin@oracle.com>
Tested-by: Kyle Fortin <kyle.fortin@oracle.com>
Reviewed-by: Joseph Slember <joe.slember@oracle.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Acked-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-06-12 20:48:04 -04:00
..
2017-06-09 22:30:55 -07:00
2017-05-31 14:26:26 -04:00
2017-06-09 01:25:16 +02:00
2017-06-08 08:04:18 -06:00
2017-04-30 12:22:14 +02:00
2017-04-20 12:16:10 -06:00
2017-06-11 12:02:01 -07:00
2017-05-10 13:38:18 -07:00
2017-05-12 10:43:25 -07:00
2017-06-09 01:25:16 +02:00
2017-05-09 23:21:46 +02:00
2017-05-10 11:33:08 -07:00
2017-06-09 08:50:49 -07:00
2017-06-02 11:49:44 +05:30
2017-04-20 13:47:46 +05:30
2017-05-03 16:27:36 +02:00
2017-06-11 11:29:15 -07:00
2017-04-26 11:38:56 +02:00
2017-06-09 09:38:27 +02:00
2017-06-09 13:12:02 +10:00
2017-06-02 09:23:56 -07:00
2017-04-21 17:58:45 +02:00
2017-05-04 19:15:35 -07:00
2017-06-03 03:55:43 -07:00
2017-05-08 17:15:14 -07:00
2017-05-22 19:22:19 -07:00
2017-05-08 17:36:39 -04:00
2017-05-01 23:17:37 +02:00
2017-05-22 21:53:09 +02:00
2017-06-01 17:20:14 -04:00
2017-06-09 09:57:19 -07:00
2017-05-30 11:31:32 +02:00
2017-05-21 11:45:26 -07:00
2017-06-01 14:49:47 -04:00
2017-05-22 21:12:44 +02:00
2017-05-04 07:53:04 -06:00
2017-05-05 19:33:07 -07:00
2017-04-27 16:20:04 +05:30
2017-06-05 16:04:35 -07:00
2017-06-06 09:37:44 -07:00
2017-06-01 17:07:31 -07:00
2017-04-24 18:21:17 -04:00
2017-04-27 11:54:49 +01:00
2017-06-11 11:29:15 -07:00
2017-05-26 09:05:35 -07:00
2017-05-22 09:42:29 +02:00
2017-06-06 16:26:28 -04:00
2017-04-20 09:54:24 +02:00
2017-05-12 15:43:10 -07:00
2017-06-07 11:08:55 +02:00
2017-05-09 10:01:15 -07:00
2017-05-30 11:31:32 +02:00
2017-04-20 12:02:32 +01:00
2017-05-23 14:18:17 -05:00
2017-05-10 19:13:03 -07:00
2017-05-30 12:40:03 +01:00
2017-06-01 15:03:41 +05:30
2017-05-23 11:31:27 +02:00
2017-05-25 18:26:11 +02:00
2017-05-12 12:02:21 -07:00
2017-05-14 13:30:05 +02:00
2017-05-01 16:15:18 -07:00
2017-05-04 19:15:35 -07:00
2017-04-30 22:17:44 +09:00
2017-05-10 11:33:08 -07:00
2017-05-24 10:53:41 +02:00
2017-05-10 11:33:08 -07:00
2017-05-22 20:32:05 +02:00
2017-05-16 09:24:44 -07:00
2017-06-12 20:48:04 -04:00
2017-05-19 13:36:56 -07:00
2017-04-26 15:58:22 +01:00
2017-06-11 11:25:51 -07:00
2017-05-31 15:12:57 -07:00
2017-05-18 23:54:47 -07:00
2017-05-23 20:09:34 -07:00
2017-06-04 10:23:25 +02:00
2017-05-16 23:06:41 +02:00
2017-06-03 09:47:16 +09:00
2017-05-17 11:27:41 +02:00
2017-05-05 11:36:44 -07:00
2017-05-08 17:15:12 -07:00
2017-05-11 11:12:26 -07:00
2017-05-08 17:15:10 -07:00
2017-05-02 23:41:43 +03:00
2017-05-19 10:42:25 +02:00
2017-06-09 09:59:51 -07:00
2017-05-10 21:03:31 +02:00