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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30CDDC432BE for ; Tue, 31 Aug 2021 16:51:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C8A19600AA for ; Tue, 31 Aug 2021 16:51:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C8A19600AA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 2D04694000B; Tue, 31 Aug 2021 12:51:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 27EF78D0001; Tue, 31 Aug 2021 12:51:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 146C694000B; Tue, 31 Aug 2021 12:51:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0052.hostedemail.com [216.40.44.52]) by kanga.kvack.org (Postfix) with ESMTP id 02BB68D0001 for ; Tue, 31 Aug 2021 12:51:26 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A37111804E92D for ; Tue, 31 Aug 2021 16:51:25 +0000 (UTC) X-FDA: 78535966530.10.E248DF2 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf28.hostedemail.com (Postfix) with ESMTP id 155B490000A7 for ; Tue, 31 Aug 2021 16:51:24 +0000 (UTC) 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 07A9E222C7; Tue, 31 Aug 2021 16:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1630428684; 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=OklJGxSi0BbSbVaTpes0b4IBJRwo4fxs/JZP6qZD18I=; b=2NTsRNKLu2TQozUQFmb6kqQ9YjVWwPKjLGyEAfxXNEYB0RR7tM/+K0AkfN6iXnz2hfqHgm nch9cMtAgEfKADPOR62XhxwPLOQP9dzu4PsOMfI4Z8SZVJyDpAGY8uCc3j2JQmL6c0mrSk yT08R6avt4HbpqNBC3fJZGRLwdSeyFU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1630428684; 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=OklJGxSi0BbSbVaTpes0b4IBJRwo4fxs/JZP6qZD18I=; b=EIsWg9jYEpTYgfPXmleG5avQ8CrvUU7pNqWnnrqeSwUnluIZh+gDBSR8+aU2n8WXCR1tvU vwfa5eC2gRYRTdDg== 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 DF851131F5; Tue, 31 Aug 2021 16:51:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id xnt/NQteLmGSXQAAGKfGzw (envelope-from ); Tue, 31 Aug 2021 16:51:23 +0000 Message-ID: <11357114-eb6e-39a6-b16d-5e380f770943@suse.cz> Date: Tue, 31 Aug 2021 18:51:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0.3 Subject: Re: Stuck looping on list_empty(list) in free_pcppages_bulk() Content-Language: en-US To: Sultan Alsawaf , linux-mm@kvack.org Cc: mhocko@suse.com, mgorman@techsingularity.net, akpm@linux-foundation.org, linux-kernel@vger.kernel.org References: From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=2NTsRNKL; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=EIsWg9jY; spf=pass (imf28.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 155B490000A7 X-Stat-Signature: zuwdh6akxb3qs6gkm7j7p8wyfawufw5r X-HE-Tag: 1630428684-824245 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: On 8/31/21 01:12, Sultan Alsawaf wrote: > With some more gdb digging, I found that the `count` variable was stored in %ESI > at the time of the stall. According to register dump in the splat, %ESI was 7. > > It looks like, for some reason, the pcp count was 7 higher than the number of > pages actually present in the pcp lists. > > I tried to find some way that this could happen, but the only thing I could > think of was that maybe an allocation had both __GFP_RECLAIMABLE and > __GFP_MOVABLE set in its gfp mask, in which case the rmqueue() call in > get_page_from_freelist() would pass in a migratetype equal to MIGRATE_PCPTYPES > and then pages could be added to an out-of-bounds pcp list while still > incrementing the overall pcp count. This seems pretty unlikely though. As > another side note, it looks like there's nothing stopping this from occurring; > there's only a VM_WARN_ON() in gfp_migratetype() that checks if both bits are > set. > > Any ideas on what may have happened here, or a link to a commit that may have > fixed this issue in newer kernels, would be much appreciated. Does the kernel have commit 88e8ac11d2ea3 backported? If not, and there were memory hotplug operations happening, the infinite loop could happen. If that commit was not backported, and instead 5c3ad2eb7104 was backported, possibly there are more scenarios outside hotplug that can cause trouble. > Thanks, > Sultan >