Michal Hocko
a90e90b7d5
cgroup, netclassid: add a preemption point to write_classid
We have seen a customer complaining about soft lockups on !PREEMPT
kernel config with 4.4 based kernel
[1072141.435366] NMI watchdog: BUG: soft lockup - CPU#21 stuck for 22s! [systemd:1]
[1072141.444090] Modules linked in: mpt3sas raid_class binfmt_misc af_packet 8021q garp mrp stp llc xfs libcrc32c bonding iscsi_ibft iscsi_boot_sysfs msr ext4 crc16 jbd2 mbcache cdc_ether usbnet mii joydev hid_generic usbhid intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ipmi_ssif mgag200 i2c_algo_bit ttm ipmi_devintf drbg ixgbe drm_kms_helper vxlan ansi_cprng ip6_udp_tunnel drm aesni_intel udp_tunnel aes_x86_64 iTCO_wdt syscopyarea ptp xhci_pci lrw iTCO_vendor_support pps_core gf128mul ehci_pci glue_helper sysfillrect mdio pcspkr sb_edac ablk_helper cryptd ehci_hcd sysimgblt xhci_hcd fb_sys_fops edac_core mei_me lpc_ich ses usbcore enclosure dca mfd_core ipmi_si mei i2c_i801 scsi_transport_sas usb_common ipmi_msghandler shpchp fjes wmi processor button acpi_pad btrfs xor raid6_pq sd_mod crc32c_intel megaraid_sas sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua scsi_mod md_mod autofs4
[1072141.444146] Supported: Yes
[1072141.444149] CPU: 21 PID: 1 Comm: systemd Not tainted 4.4.121-92.80-default #1
[1072141.444150] Hardware name: LENOVO Lenovo System x3650 M5 -[5462P4U]- -[5462P4U]-/01GR451, BIOS -[TCE136H-2.70]- 06/13/2018
[1072141.444151] task: ffff880191bd0040 ti: ffff880191bd4000 task.ti: ffff880191bd4000
[1072141.444153] RIP: 0010:[<ffffffff815229f9>] [<ffffffff815229f9>] update_classid_sock+0x29/0x40
[1072141.444157] RSP: 0018:ffff880191bd7d58 EFLAGS: 00000286
[1072141.444158] RAX: ffff883b177cb7c0 RBX: 0000000000000000 RCX: 0000000000000000
[1072141.444159] RDX: 00000000000009c7 RSI: ffff880191bd7d5c RDI: ffff8822e29bb200
[1072141.444160] RBP: ffff883a72230980 R08: 0000000000000101 R09: 0000000000000000
[1072141.444161] R10: 0000000000000008 R11: f000000000000000 R12: ffffffff815229d0
[1072141.444162] R13: 0000000000000000 R14: ffff881fd0a47ac0 R15: ffff880191bd7f28
[1072141.444163] FS: 00007f3e2f1eb8c0(0000) GS:ffff882000340000(0000) knlGS:0000000000000000
[1072141.444164] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[1072141.444165] CR2: 00007f3e2f200000 CR3: 0000001ffea4e000 CR4: 00000000001606f0
[1072141.444166] Stack:
[1072141.444166] ffffffa800000246 00000000000009c7 ffffffff8121d583 ffff8818312a05c0
[1072141.444168] ffff8818312a1100 ffff880197c3b280 ffff881861422858 ffffffffffffffea
[1072141.444170] ffffffff81522b1c ffffffff81d0ca20 ffff8817fa17b950 ffff883fdd8121e0
[1072141.444171] Call Trace:
[1072141.444179] [<ffffffff8121d583>] iterate_fd+0x53/0x80
[1072141.444182] [<ffffffff81522b1c>] write_classid+0x4c/0x80
[1072141.444187] [<ffffffff8111328b>] cgroup_file_write+0x9b/0x100
[1072141.444193] [<ffffffff81278bcb>] kernfs_fop_write+0x11b/0x150
[1072141.444198] [<ffffffff81201566>] __vfs_write+0x26/0x100
[1072141.444201] [<ffffffff81201bed>] vfs_write+0x9d/0x190
[1072141.444203] [<ffffffff812028c2>] SyS_write+0x42/0xa0
[1072141.444207] [<ffffffff815f58c3>] entry_SYSCALL_64_fastpath+0x1e/0xca
[1072141.445490] DWARF2 unwinder stuck at entry_SYSCALL_64_fastpath+0x1e/0xca
If a cgroup has many tasks with many open file descriptors then we would
end up in a large loop without any rescheduling point throught the
operation. Add cond_resched once per task.
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2018-10-23 12:58:17 -07:00
..
2018-07-06 12:32:12 +02:00
2018-08-17 17:27:58 -07:00
2017-11-21 15:57:07 -08:00
2018-07-24 14:10:43 -07:00
2018-06-28 10:40:47 -07:00
2018-08-15 15:04:25 -07:00
2018-07-24 14:10:42 -07:00
2018-07-20 21:17:12 -07:00
2018-09-11 13:33:57 +02:00
2018-08-03 00:47:32 +02:00
2018-08-15 15:04:25 -07:00
2018-08-06 10:33:44 -07:00
2018-07-30 09:10:25 -07:00
2018-06-28 10:40:47 -07:00
2018-08-13 17:55:44 +02:00
2018-10-23 12:58:17 -07:00
2018-07-27 13:17:50 -07:00
2018-08-09 11:52:36 -07:00
2018-08-09 14:11:24 -07:00
2018-07-24 14:10:43 -07:00
2018-08-27 15:24:33 -07:00
2018-06-26 11:33:04 +09:00
2017-10-25 13:00:27 +09:00
2018-08-06 11:21:15 +02:00
2018-04-22 21:12:00 -04:00
2018-09-16 15:27:44 -07:00
2018-09-17 19:42:14 -07:00
2018-09-05 22:32:22 -07:00
2018-09-17 18:43:42 -07:00
2018-07-27 09:33:37 -07:00
2018-08-13 20:45:49 -07:00
2017-11-21 16:35:54 -08:00
2018-08-09 11:52:36 -07:00
2018-09-03 22:12:02 -07:00
2018-08-06 11:21:37 +02:00
2018-07-24 14:10:42 -07:00
2018-08-22 21:39:08 -07:00
2018-09-11 21:17:30 -07:00
2018-06-19 10:43:55 -04:00
2018-08-05 13:04:31 -07:00
2018-06-28 10:40:47 -07:00
2018-07-30 09:10:25 -07:00
2018-07-12 16:55:29 -07:00
2018-08-02 10:55:32 -07:00
2018-08-31 23:00:28 -07:00
2018-06-28 10:40:47 -07:00
2017-11-01 12:19:03 +09:00
2018-07-05 20:20:03 +09:00
2018-09-12 00:09:19 -07:00
2018-09-03 22:12:02 -07:00
2018-06-28 10:40:47 -07:00
2018-08-15 15:04:25 -07:00
2018-09-14 08:46:28 -07:00
2018-09-03 21:57:54 -07:00
2018-08-17 16:45:51 -06:00
2018-08-01 10:00:06 -07:00
2018-08-23 16:03:58 -07:00
2017-11-10 13:41:40 +09:00
2018-09-12 13:15:04 -07:00
2018-09-17 08:03:09 -07:00
2018-08-03 16:44:19 -07:00
2018-08-07 12:39:13 -07:00
2018-07-24 14:10:42 -07:00
2018-09-03 22:12:02 -07:00
2018-07-24 14:10:42 -07:00
2018-08-21 22:06:53 +02:00
2018-08-02 10:55:32 -07:00
2018-08-06 10:42:48 -07:00
2018-07-24 14:10:43 -07:00
2018-06-28 13:36:39 +09:00
2018-09-13 16:01:06 -07:00
2018-03-27 13:18:09 -04:00