From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B166BC48BC3 for ; Wed, 21 Feb 2024 09:21:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B1B76B0072; Wed, 21 Feb 2024 04:21:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 361976B0075; Wed, 21 Feb 2024 04:21:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 229CC6B0080; Wed, 21 Feb 2024 04:21:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 121AD6B0072 for ; Wed, 21 Feb 2024 04:21:13 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id D22F7A09C9 for ; Wed, 21 Feb 2024 09:21:12 +0000 (UTC) X-FDA: 81815267184.05.29456AD Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf05.hostedemail.com (Postfix) with ESMTP id AF9BC100003 for ; Wed, 21 Feb 2024 09:21:10 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qCRKKfCQ; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=OnuzeNWz; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=SxIjXSKF; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="/9TPJpB3"; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf05.hostedemail.com: domain of tiwai@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=tiwai@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708507271; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1sXJyWtq+AXXfh+jaGYov5UgxI4/+MWGmULtXt77Th0=; b=qrO+v6EYG7E9Axg3ijhG4n345upNEs87KqRIgMh3B276xee22s+9nd9pIV0fD5bFOUrpo+ hmvSec4eZr22Yhq8xGw3G2G3eh3GuXFEHk+vsm1WAq7hkZkiZYPVZRXzwsDQtqWt0KO8qH Uj5m0o81FjHjf6o3Xg3ATZE9l0BgLiA= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qCRKKfCQ; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=OnuzeNWz; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=SxIjXSKF; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="/9TPJpB3"; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf05.hostedemail.com: domain of tiwai@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=tiwai@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708507271; a=rsa-sha256; cv=none; b=5jhSrdvTx4nQDDxsONutLP1ul8n8GsBGiSmRpYEPNtVl2IlR/ZdW+Crk9K4RoePqKRChLR /pPmTUAug1IbywM3Zl8ia5Wjt3TE/1xVAbNeCFJrhtj6bHfG6pVnc9RQ8DOeq34AkxHBNi X6wgS19VZmo/Y5HEvdL6n+l5QYjxZfc= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EA7771FB4C; Wed, 21 Feb 2024 09:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708507269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1sXJyWtq+AXXfh+jaGYov5UgxI4/+MWGmULtXt77Th0=; b=qCRKKfCQF4da1DJd7nweAh7w1tbQFmDDjjS2dS0EGLvP8L9gZUpipGYhtQfiyWIGNtN+/S zOYFaUJzFR+226bxjHJLSqJFuuCdA81R/UFY8h7IQw+JawBSHftSHVRj0RsPLx1QRASbuJ U2QhRTTfnLHL/BaTKAYzO7dMKHy3Gy0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708507269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1sXJyWtq+AXXfh+jaGYov5UgxI4/+MWGmULtXt77Th0=; b=OnuzeNWzmWFyodUYNOuiP5nJx7tU0MIOpxIQRFYrkclUEm84y0OTtXj5p0p5RvaW7XoztU jhcg6bDeqWqnY7Ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708507268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1sXJyWtq+AXXfh+jaGYov5UgxI4/+MWGmULtXt77Th0=; b=SxIjXSKF1UmH1gZFl0yNP7nSOM/UgjBZrPRKLyaE3BIgeEilr1onz7glRbOTOry7Uq8eSS PwzjOHQnW/8MAlZjUvC4alig72w8hN2HSS1qKySDar/oROMoI19my+Ong2XotMW0brRyqd pRXrDLKVxzAKqBLo3hdvNRkjel+/8Jc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708507268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1sXJyWtq+AXXfh+jaGYov5UgxI4/+MWGmULtXt77Th0=; b=/9TPJpB31e83HnvGa2NgISfNUxD5WkcH5qy5bPFxZd4WSTAGpIRrnF+SxB1EegO/C3aH7q eGloLFhYgpNDC7Ag== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8A0E8139D0; Wed, 21 Feb 2024 09:21:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id g1ymH4TA1WV2NAAAD6G6ig (envelope-from ); Wed, 21 Feb 2024 09:21:08 +0000 Date: Wed, 21 Feb 2024 10:21:08 +0100 Message-ID: <87le7e6um3.wl-tiwai@suse.de> From: Takashi Iwai To: Sven van Ashbrook Cc: Vlastimil Babka , Takashi Iwai , Karthikeyan Ramasubramanian , LKML , Brian Geffon , stable@vger.kernel.org, Curtis Malainey , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-mm@kvack.org Subject: Re: Stall at page allocations with __GFP_RETRY_MAYFAIL (Re: [PATCH v1] ALSA: memalloc: Fix indefinite hang in non-iommu case) In-Reply-To: References: <20240214170720.v1.1.Ic3de2566a7fd3de8501b2f18afa9f94eadb2df0a@changeid> <87jzn0ofdb.wl-tiwai@suse.de> <235ab5aa-90a4-4dd7-b2c6-70469605bcfb@suse.cz> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Rspam-User: X-Stat-Signature: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Jg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, 20 Feb 2024 16:52:14 +0100, Sven van Ashbrook wrote: > > Takaski, Vlastimil: thanks so much for the engagement! See below. > > > On 2/19/24 12:36, Takashi Iwai wrote: > > > > > > Karthikeyan, Sven, and co: could you guys show the stack trace at the > > > stall? This may give us more clear light. > > Here are two typical stack traces at the stall. Note that the timer interrupt > is just a software watchdog that fires to generate the stack trace. > This is running the v6.1 kernel. > We should be able to reproduce this on v6.6 as well if need be. > > <4>[310289.546429] > <4>[310289.546431] asm_sysvec_apic_timer_interrupt+0x16/0x20 > <4>[310289.546434] RIP: 0010:super_cache_count+0xc/0xea > <4>[310289.546438] Code: ff ff e8 48 ac e3 ff 4c 89 e0 48 83 c4 20 5b > 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 0f 1f 44 00 00 f6 87 23 > fc ff ff 20 <75> 08 31 c0 c3 cc cc cc cc cc 55 48 89 e5 41 57 41 56 41 > 54 53 49 > <4>[310289.546440] RSP: 0018:ffffa64e8aed35c0 EFLAGS: 00000202 > <4>[310289.546443] RAX: 0000000000000080 RBX: 0000000000000400 RCX: > 0000000000000000 > <4>[310289.546445] RDX: ffffffffa6d66bc8 RSI: ffffa64e8aed3610 RDI: > ffff9fd2873dbc30 > <4>[310289.546447] RBP: ffffa64e8aed3660 R08: 0000000000000064 R09: > 0000000000000000 > <4>[310289.546449] R10: ffffffffa6e3b260 R11: ffffffffa5163a52 R12: > ffff9fd2873dbc50 > <4>[310289.546451] R13: 0000000000046c00 R14: 0000000000000000 R15: > 0000000000000000 > <4>[310289.546453] ? super_cache_scan+0x199/0x199 > <4>[310289.546457] shrink_slab+0xb3/0x37e > <4>[310289.546460] shrink_node+0x377/0x110e > <4>[310289.546464] ? sysvec_apic_timer_interrupt+0x17/0x80 > <4>[310289.546467] ? asm_sysvec_apic_timer_interrupt+0x16/0x20 > <4>[310289.546471] try_to_free_pages+0x46e/0x857 > <4>[310289.546475] ? psi_task_change+0x7f/0x9c > <4>[310289.546478] __alloc_pages_slowpath+0x4e2/0xe5c > <4>[310289.546482] __alloc_pages+0x225/0x2a2 > <4>[310289.546486] __dma_direct_alloc_pages+0xed/0x1cb > <4>[310289.546489] dma_direct_alloc_pages+0x21/0xa3 > <4>[310289.546493] dma_alloc_noncontiguous+0xd1/0x144 > <4>[310289.546496] snd_dma_noncontig_alloc+0x45/0xe3 > <4>[310289.546499] snd_dma_alloc_dir_pages+0x4f/0x81 > <4>[310289.546502] hda_cl_stream_prepare+0x66/0x15e > [snd_sof_intel_hda_common (HASH:1255 1)] > <4>[310289.546510] hda_dsp_cl_boot_firmware+0xc4/0x2ca > [snd_sof_intel_hda_common (HASH:1255 1)] > <4>[310289.546518] snd_sof_run_firmware+0xca/0x2d7 [snd_sof (HASH:ecd9 2)] > <4>[310289.546526] ? hda_dsp_resume+0x97/0x1a7 > [snd_sof_intel_hda_common (HASH:1255 1)] > <4>[310289.546534] sof_resume+0x155/0x251 [snd_sof (HASH:ecd9 2)] > <4>[310289.546542] ? pci_pm_suspend+0x1e7/0x1e7 > <4>[310289.546546] dpm_run_callback+0x3c/0x132 > <4>[310289.546549] device_resume+0x1f7/0x282 > <4>[310289.546552] ? dpm_watchdog_set+0x54/0x54 > <4>[310289.546555] async_resume+0x1f/0x5b > <4>[310289.546558] async_run_entry_fn+0x2b/0xc5 > <4>[310289.546561] process_one_work+0x1be/0x381 > <4>[310289.546564] worker_thread+0x20b/0x35b > <4>[310289.546568] kthread+0xde/0xf7 > <4>[310289.546571] ? pr_cont_work+0x54/0x54 > <4>[310289.546574] ? kthread_blkcg+0x32/0x32 > <4>[310289.546577] ret_from_fork+0x1f/0x30 > <4>[310289.546580] > > <4>[171032.151834] > <4>[171032.151835] asm_sysvec_apic_timer_interrupt+0x16/0x20 > <4>[171032.151839] RIP: 0010:_raw_spin_unlock_irq+0x10/0x28 > <4>[171032.151842] Code: 2c 70 74 06 c3 cc cc cc cc cc 55 48 89 e5 e8 > 7e 30 2b ff 5d c3 cc cc cc cc cc 0f 1f 44 00 00 c6 07 00 fb 65 ff 0d > af b1 2c 70 <74> 06 c3 cc cc cc cc cc 55 48 89 e5 e8 56 30 2b ff 5d c3 > cc cc cc > <4>[171032.151844] RSP: 0018:ffff942447b334d8 EFLAGS: 00000286 > <4>[171032.151847] RAX: 0000000000000031 RBX: 0000000000000001 RCX: > 0000000000000034 > <4>[171032.151849] RDX: 0000000000000031 RSI: 0000000000000002 RDI: > ffffffff9103b1b0 > <4>[171032.151851] RBP: ffff942447b33660 R08: 0000000000000032 R09: > 0000000000000010 > <4>[171032.151853] R10: ffffffff9103b370 R11: 00000000ffffffff R12: > ffffffff9103b160 > <4>[171032.151855] R13: ffffd055000111c8 R14: 0000000000000000 R15: > 0000000000000031 > <4>[171032.151858] evict_folios+0xf9e/0x1307 > <4>[171032.151861] ? asm_sysvec_apic_timer_interrupt+0x16/0x20 > <4>[171032.151866] shrink_node+0x2e8/0x110e > <4>[171032.151870] ? common_interrupt+0x1c/0x95 > <4>[171032.151872] ? common_interrupt+0x1c/0x95 > <4>[171032.151875] ? asm_common_interrupt+0x22/0x40 > <4>[171032.151878] ? __compaction_suitable+0x7c/0x9d > <4>[171032.151882] try_to_free_pages+0x46e/0x857 > <4>[171032.151885] ? psi_task_change+0x7f/0x9c > <4>[171032.151889] __alloc_pages_slowpath+0x4e2/0xe5c > <4>[171032.151893] __alloc_pages+0x225/0x2a2 > <4>[171032.151896] __dma_direct_alloc_pages+0xed/0x1cb > <4>[171032.151900] dma_direct_alloc_pages+0x21/0xa3 > <4>[171032.151903] dma_alloc_noncontiguous+0xd1/0x144 > <4>[171032.151907] snd_dma_noncontig_alloc+0x45/0xe3 > <4>[171032.151910] snd_dma_alloc_dir_pages+0x4f/0x81 > <4>[171032.151913] hda_cl_stream_prepare+0x66/0x15e > [snd_sof_intel_hda_common (HASH:7df0 1)] > <4>[171032.151921] hda_dsp_cl_boot_firmware+0xc4/0x2ca > [snd_sof_intel_hda_common (HASH:7df0 1)] > <4>[171032.151929] snd_sof_run_firmware+0xca/0x2d7 [snd_sof (HASH:9f20 2)] > <4>[171032.151937] ? hda_dsp_resume+0x97/0x1a7 > [snd_sof_intel_hda_common (HASH:7df0 1)] > <4>[171032.151945] sof_resume+0x155/0x251 [snd_sof (HASH:9f20 2)] > <4>[171032.151953] ? pci_pm_suspend+0x1e7/0x1e7 > <4>[171032.151957] dpm_run_callback+0x3c/0x132 > <4>[171032.151960] device_resume+0x1f7/0x282 > <4>[171032.151962] ? dpm_watchdog_set+0x54/0x54 > <4>[171032.151965] async_resume+0x1f/0x5b > <4>[171032.151968] async_run_entry_fn+0x2b/0xc5 > <4>[171032.151971] process_one_work+0x1be/0x381 > <4>[171032.151975] worker_thread+0x20b/0x35b > <4>[171032.151978] kthread+0xde/0xf7 > <4>[171032.151981] ? pr_cont_work+0x54/0x54 > <4>[171032.151984] ? kthread_blkcg+0x32/0x32 > <4>[171032.151987] ret_from_fork+0x1f/0x30 > <4>[171032.151991] Thanks! Both look like the code path via async PM resume. Were both from the runtime PM resume? Or the system resume? Takashi