Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5306117pxv; Wed, 21 Jul 2021 02:13:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx79rNvycishKp6qkAn79xV4AjPNE0CM3cgrt70V37Dmihkog6Ad/WhMlgQtTAqlcvXto73 X-Received: by 2002:aa7:dbc8:: with SMTP id v8mr45690785edt.242.1626858797584; Wed, 21 Jul 2021 02:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626858797; cv=none; d=google.com; s=arc-20160816; b=whWCczrolka5E/zMZnXyaQc8cu45zQ35BzOBUryyicHuUgPG7b2w9FRPjHzLtk73Fw y0ldR9ZP8ztv9Z4xzLycHglMiJ14pqmmSUwORM48HGrXgR6GpHKeP/SypmzghlcuQ9sY W9P41LCxXxeLoW+vU8i3OlgqpUoiQK91XwGw+yx4gjjpLxGXlWqFBy1Reb80rUpVELVm rkocTlQhwu1ZnR1rdjZFuhU1vA9nDhMsodxGDUiMB2qKWp4QnivnUwwEQgvXmN8qUBjY U5Cmv5fsktu/wGsPI7O2OScrfl6A9OneCQ+4/LN5+r/HjzIJSDZREevW/lRTZ5/W1Xev Efgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to:dkim-signature:dkim-signature; bh=GV4EH+LUx8k8415eaM5w7Ajz0rH98YCcAorT7SWra2M=; b=xAaApSJWG4oDlCKBRDyVZbD60NTgVMH4IXdgJzPPmPiclxbjLEirf5fFW88u3o5Q/2 THB3XPCUx5Oh8pQlGora6QK0FgNVVIpD7Jf+TVN4F5pUb77cgxfVtYOsICh2h7/U5dQK Uacsso5e5nFJXbtDhb5spurX5cPSJXqDPLZQc6lSr4LnVsldoEjSgZYUJIzQdN0hwXH5 Clp5zThn/xVbDzNLYiB4Jp8O/TA2Sh5NkwvDSDnmdzVQEmwSHTUfsD7uu06eQ5VZCNIs Vuv1V9CsPyFj2+c4y7hkBBK567E51PuL3qIvtuaVmqzhTjc8jkSoBQCuwFQ1NLf3ylV2 BZqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="vVq/1WSN"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=9aA7pfiA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si14452169ejx.724.2021.07.21.02.12.54; Wed, 21 Jul 2021 02:13:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="vVq/1WSN"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=9aA7pfiA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237602AbhGUIYh (ORCPT + 99 others); Wed, 21 Jul 2021 04:24:37 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:45730 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237552AbhGUIOx (ORCPT ); Wed, 21 Jul 2021 04:14:53 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5C277224E6; Wed, 21 Jul 2021 08:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1626857044; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GV4EH+LUx8k8415eaM5w7Ajz0rH98YCcAorT7SWra2M=; b=vVq/1WSNagTpuOaRP4J6sYRPQuxJn2pGKuSP9JavQuUz36yD05vK0bPz3RoBgEj0Oj0s6o PbyFlaxQwY2Zgj25omAL7ezvzegkrCNXRdThVuoey29iVJ2es/XmaS22DdFtOnw4G0xCGB O208Ry8S32Mbs5FJeyJvIWNhwfhUqqk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1626857044; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GV4EH+LUx8k8415eaM5w7Ajz0rH98YCcAorT7SWra2M=; b=9aA7pfiAkFLFapS83qB/5qNs1S2qesMhB1eSq5paBhUFpgKlX/gwLWgT8dYgbaujc5j3u7 LZBDX584pw9rABCA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 425CA13BC9; Wed, 21 Jul 2021 08:44:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id hgh5D1Te92CwKQAAGKfGzw (envelope-from ); Wed, 21 Jul 2021 08:44:04 +0000 To: Mike Galbraith , Thomas Gleixner , LKML Cc: linux-rt-users@vger.kernel.org, Mel Gorman , Sebastian Andrzej Siewior References: <87tul5p2fa.ffs@nanos.tec.linutronix.de> <8c0e0c486056b5185b58998f2cce62619ed3f05c.camel@gmx.de> <878s2fnv79.ffs@nanos.tec.linutronix.de> <6c0e20dd84084036d5068e445746c3ed7e82ec4b.camel@gmx.de> <7431ceb9761c566cf2d1f6f263247acd8d38c4b5.camel@gmx.de> <240f104fc6757d8c38fa01342511eda931632d5a.camel@gmx.de> From: Vlastimil Babka Subject: Re: [rfc/patch] mm/slub: restore/expand unfreeze_partials() local exclusion scope Message-ID: <69da2ecd-a797-e264-fbfa-13108dc7a573@suse.cz> Date: Wed, 21 Jul 2021 10:44:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <240f104fc6757d8c38fa01342511eda931632d5a.camel@gmx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/21/21 6:56 AM, Mike Galbraith wrote: > On Tue, 2021-07-20 at 13:26 +0200, Mike Galbraith wrote: >> On Tue, 2021-07-20 at 10:56 +0200, Vlastimil Babka wrote: >> > > crash> bt -sx >> > > PID: 18761 TASK: ffff88812fff0000 CPU: 0 COMMAND: "hackbench" >> > > #0 [ffff88818f8ff980] machine_kexec+0x14f at ffffffff81051c8f >> > > #1 [ffff88818f8ff9c8] __crash_kexec+0xd2 at ffffffff8111ef72 >> > > #2 [ffff88818f8ffa88] crash_kexec+0x30 at ffffffff8111fd10 >> > > #3 [ffff88818f8ffa98] oops_end+0xd3 at ffffffff810267e3 >> > > #4 [ffff88818f8ffab8] exc_general_protection+0x195 at >> > > ffffffff8179fdb5 >> > > #5 [ffff88818f8ffb50] asm_exc_general_protection+0x1e at >> > > ffffffff81800a0e >> > > [exception RIP: __unfreeze_partials+156] >> > >> > Hm going back to this report... >> > So could it be that it was stillput_cpu_partial() preempting >> > __slab_alloc() messing the partial list, but for some reason the >> > put_cpu_partial() side crashed this time? >> >> Thinking this bug is toast, I emptied the trash bin, so no can peek. > > I made fireworks while waiting for bike riding time, boom #10 was > finally the right flavor, but... > > crash> bt -sx > PID: 32 TASK: ffff888100a56000 CPU: 3 COMMAND: "rcuc/3" > #0 [ffff888100aa7a90] machine_kexec+0x14f at ffffffff81051c8f > #1 [ffff888100aa7ad8] __crash_kexec+0xd2 at ffffffff81120612 > #2 [ffff888100aa7b98] crash_kexec+0x30 at ffffffff811213b0 > #3 [ffff888100aa7ba8] oops_end+0xd3 at ffffffff810267e3 > #4 [ffff888100aa7bc8] exc_general_protection+0x195 at ffffffff817a2cc5 > #5 [ffff888100aa7c60] asm_exc_general_protection+0x1e at ffffffff81800a0e > [exception RIP: __unfreeze_partials+149] > RIP: ffffffff8124a295 RSP: ffff888100aa7d10 RFLAGS: 00010202 > RAX: 0000000000190016 RBX: 0000000000190016 RCX: 000000017fffffff > RDX: 00000001ffffffff RSI: 0000000000000023 RDI: ffffffff81e58b10 > RBP: ffff888100aa7da0 R8: 0000000000000000 R9: 0000000000190018 > R10: ffff888100aa7db8 R11: 000000000002d9e4 R12: ffff888100190500 > R13: ffff88810018c980 R14: 00000001ffffffff R15: ffffea0004571588 > ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 > #6 [ffff888100aa7db0] put_cpu_partial+0x8e at ffffffff8124a56e > #7 [ffff888100aa7dd0] kmem_cache_free+0x3a8 at ffffffff8124d238 > #8 [ffff888100aa7e08] rcu_do_batch+0x186 at ffffffff810eb246 > #9 [ffff888100aa7e70] rcu_core+0x25f at ffffffff810eeb2f > #10 [ffff888100aa7eb0] rcu_cpu_kthread+0x94 at ffffffff810eed24 > #11 [ffff888100aa7ee0] smpboot_thread_fn+0x249 at ffffffff8109e559 > #12 [ffff888100aa7f18] kthread+0x1ac at ffffffff810984dc > #13 [ffff888100aa7f50] ret_from_fork+0x1f at ffffffff81001b1f > crash> runq > ... > CPU 3 RUNQUEUE: ffff88840ece9980 > CURRENT: PID: 32 TASK: ffff888100a56000 COMMAND: "rcuc/3" > RT PRIO_ARRAY: ffff88840ece9bc0 > [ 94] PID: 32 TASK: ffff888100a56000 COMMAND: "rcuc/3" > CFS RB_ROOT: ffff88840ece9a40 > [120] PID: 33 TASK: ffff888100a51000 COMMAND: "ksoftirqd/3" > ... > crash> bt -sx 33 > PID: 33 TASK: ffff888100a51000 CPU: 3 COMMAND: "ksoftirqd/3" > #0 [ffff888100aabdf0] __schedule+0x2d7 at ffffffff817ad3a7 > #1 [ffff888100aabec8] schedule+0x3b at ffffffff817ae4eb > #2 [ffff888100aabee0] smpboot_thread_fn+0x18c at ffffffff8109e49c > #3 [ffff888100aabf18] kthread+0x1ac at ffffffff810984dc > #4 [ffff888100aabf50] ret_from_fork+0x1f at ffffffff81001b1f > crash> So this doesn't look like our put_cpu_partial() preempted a __slab_alloc() on the same cpu, right? There might have been __slab_alloc() in irq handler preempting us, but we won't see that anymore. I don't immediately see the root cause and this scenario should be possible on !RT too where we however didn't see these explosions. BTW did my ugly patch work? Thanks.