From patchwork Mon Dec 6 03:33:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Pache X-Patchwork-Id: 12657641 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 48235C433F5 for ; Mon, 6 Dec 2021 03:34:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9650D6B007B; Sun, 5 Dec 2021 22:34:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 914756B007D; Sun, 5 Dec 2021 22:34:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DCB96B007E; Sun, 5 Dec 2021 22:34:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id 6AD8E6B007B for ; Sun, 5 Dec 2021 22:34:32 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2B5FA894BA for ; Mon, 6 Dec 2021 03:34:22 +0000 (UTC) X-FDA: 78885951564.20.25DB411 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 99F31900009A for ; Mon, 6 Dec 2021 03:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638761661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=n5oc0wDl7UWuJyJPykXMInKWer6Lbzbx5MvcEoFOwbQ=; b=L6zJQXS8R9/86yd5FQSCK/2B6R0TshQ6gkrjdhQI5zom2i3qd0q5Vex+KPpjy0QLaJNz0Z jXYxrarLJnj3suo/Y2r5nid06xlHlhdU0Nqh8et2vlohUgD7K7bC1A81FFE6K5dC9pb5i8 30/rtpfGHlsHiyoKjAAy8P5Dt5A9d4g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-586-80jAtYPYPy-qslHQs-RcMw-1; Sun, 05 Dec 2021 22:34:19 -0500 X-MC-Unique: 80jAtYPYPy-qslHQs-RcMw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC4D22F23; Mon, 6 Dec 2021 03:34:17 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.22.16.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id 439445BAE2; Mon, 6 Dec 2021 03:34:16 +0000 (UTC) From: Nico Pache To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org Cc: shakeelb@google.com, ktkhai@virtuozzo.com, shy828301@gmail.com, guro@fb.com, vbabka@suse.cz, vdavydov.dev@gmail.com, raquini@redhat.com Subject: [RFC PATCH 0/2] mm: Dont allocate pages on a offline node Date: Sun, 5 Dec 2021 22:33:36 -0500 Message-Id: <20211206033338.743270-1-npache@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 99F31900009A X-Stat-Signature: nzfb9wnaoir71t8kasroktpmoi5pm4c9 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=L6zJQXS8; spf=none (imf28.hostedemail.com: domain of npache@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=npache@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1638761661-802570 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: Prevent page allocations from occuring on an offlined node by adding a check in _alloc_pages_node and correcting the use of for_each_node when allocating shrinkers. The first patch is more of a defensive check while the second patch directly relates to an issue we have found during testing. Signed-Off-by: Nico Pache Nico Pache (2): include/linux/gfp.h: Do not allocate pages on a offlined node mm/vmscan.c: Prevent allocating shrinker_info on offlined nodes include/linux/gfp.h | 5 ++++- mm/vmscan.c | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-)