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 06EE2C433EF for ; Wed, 9 Feb 2022 09:45:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8C00B6B0080; Wed, 9 Feb 2022 04:45:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 86E566B0081; Wed, 9 Feb 2022 04:45:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 735746B0082; Wed, 9 Feb 2022 04:45:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id 603BB6B0080 for ; Wed, 9 Feb 2022 04:45:05 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 15A63181CBDB2 for ; Wed, 9 Feb 2022 09:45:05 +0000 (UTC) X-FDA: 79122757770.09.A24011F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf01.hostedemail.com (Postfix) with ESMTP id D41B740003 for ; Wed, 9 Feb 2022 09:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644399903; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bOGT40PA5LmAnBRQIBrjCAxhYJpsutSMC+lcUcCHisA=; b=BRxdCsDfDGH5VhCvfkOQEIlRUD+vijNSnoHU4aQtuTjhxt/ck3XmcT9/z2+nhhzqvMUmbT nFH+RCF4XKbMJOZ1tY61tgl+ylJnQT+n4tza001et5EAFuVPKdUPAEzoqMBpPax00aV0Hn pbEr+PV+FrklbUfdGO9rGXIWOoOced0= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-226-8lsqjZZ1OTWsZpPUVNv1Lw-1; Wed, 09 Feb 2022 04:45:02 -0500 X-MC-Unique: 8lsqjZZ1OTWsZpPUVNv1Lw-1 Received: by mail-wm1-f70.google.com with SMTP id l4-20020a05600c4f0400b0037bb2ce79d8so2380987wmq.9 for ; Wed, 09 Feb 2022 01:45:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=bOGT40PA5LmAnBRQIBrjCAxhYJpsutSMC+lcUcCHisA=; b=00WyxN7O0k3K11NBaBLDFya3t4R+pQ5Mv2civYr4yPQhlBJLPDg2PETLjBW5wNYDjM kdU4VdS5BjaxERTlb91pCQIRlyV+7FQeONc76q09WQHNOia5ueEpAtegxebLCdnAraNY mvwgvAtbDiq9BiVs1eOZzFrvbIo2VyL6P8SXHy1roeqsDRZhnh1qbA1OhH1S0JNk5xas 04K99W7DyvM3qSMdjxLAX+snP47lNMRGPIWrrmrcwN0mZC81cFhltuMI6j8qy1j0hkLR C1OT+9OumzQkC6R3SWJTca5PtPrj36PD+F7p8VeqE1ujaTpJP/CWW1AkU9Fw3QZoqFbq W6Rg== X-Gm-Message-State: AOAM530Cdc9W1dIh9oJqMevqe63bGciqPv8RPf/ibSQcLk117RP1erTI BDsxclD+jtqL8pbHXTC+yDQo0fJns5LipcMt4VLK1rwBKopW7npnI4c5TiGD/lAoScUvwC5j5xK pexIMh/8ZV8Y= X-Received: by 2002:a1c:7418:: with SMTP id p24mr1246569wmc.21.1644399901449; Wed, 09 Feb 2022 01:45:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvFdeFjkesIm97KwdAHOETISeFDFk5mT6+L7zC0mhqZYGBbdP+JGwExuY5pOJJ7UuI+EuXSg== X-Received: by 2002:a1c:7418:: with SMTP id p24mr1246546wmc.21.1644399901192; Wed, 09 Feb 2022 01:45:01 -0800 (PST) Received: from ?IPv6:2a0c:5a80:1204:1500:37e7:8150:d9df:36f? ([2a0c:5a80:1204:1500:37e7:8150:d9df:36f]) by smtp.gmail.com with ESMTPSA id h6sm4428856wmq.26.2022.02.09.01.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:45:00 -0800 (PST) Message-ID: Subject: Re: [PATCH 0/2] mm/page_alloc: Remote per-cpu lists drain support From: Nicolas Saenz Julienne To: Xiongfeng Wang , akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, frederic@kernel.org, tglx@linutronix.de, mtosatti@redhat.com, mgorman@suse.de, linux-rt-users@vger.kernel.org, vbabka@suse.cz, cl@linux.com, paulmck@kernel.org, willy@infradead.org Date: Wed, 09 Feb 2022 10:45:00 +0100 In-Reply-To: <7c87f388-cc50-e9a1-17a7-802bb42656e4@huawei.com> References: <20220208100750.1189808-1-nsaenzju@redhat.com> <7c87f388-cc50-e9a1-17a7-802bb42656e4@huawei.com> User-Agent: Evolution 3.42.3 (3.42.3-1.fc35) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BRxdCsDf; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf01.hostedemail.com: domain of nsaenzju@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=nsaenzju@redhat.com X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: D41B740003 X-Stat-Signature: jxmfoytt7k966tzbwazafy4te9nc4tp4 X-HE-Tag: 1644399903-506740 Content-Transfer-Encoding: quoted-printable 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: Hi Xiongfeng, thanks for taking the time to look at this. On Wed, 2022-02-09 at 16:55 +0800, Xiongfeng Wang wrote: > Hi Nicolas=EF=BC=8C >=20 > When I applied the patchset on the following commit and tested on QEMU,= I came > accross the following CallTrace. > commit dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0 >=20 > I wrote a userspace application to consume the memory. When the memory = is used > out, the OOM killer is triggered and the following Calltrace is printed= . I am > not sure if it is related to this patchset. But when I reverted this pa= tchset, > the 'NULL pointer' Calltrace didn't show. It's a silly mistake on my part, while cleaning up the code I messed up o= ne of the 'struct per_cpu_pages' accessors. This should fix it: ------------------------->8------------------------- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 0caa7155ca34..e65b991c3dc8 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3279,7 +3279,7 @@ static void __drain_all_pages(struct zone *zone, bo= ol force_all_cpus) has_pcps =3D true; } else { for_each_populated_zone(z) { - pcp =3D per_cpu_ptr(zone->per_cpu_pageset= , cpu); + pcp =3D per_cpu_ptr(z->per_cpu_pageset, c= pu); lp =3D rcu_dereference_protected(pcp->lp, mutex_is_locked(&pcpu_dra= in_mutex)); if (lp->count) { ------------------------->8------------------------- Thanks! --=20 Nicol=C3=A1s S=C3=A1enz