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 AEC00C433F5 for ; Tue, 22 Mar 2022 21:44:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E0026B0120; Tue, 22 Mar 2022 17:44:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 16BE96B0122; Tue, 22 Mar 2022 17:44:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F224B6B0121; Tue, 22 Mar 2022 17:44:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id DB7556B011F for ; Tue, 22 Mar 2022 17:44:55 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 6BB20121953 for ; Tue, 22 Mar 2022 21:44:55 +0000 (UTC) X-FDA: 79273352550.11.F92B8CD Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf17.hostedemail.com (Postfix) with ESMTP id 19BC940033 for ; Tue, 22 Mar 2022 21:44:54 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A294D6104C; Tue, 22 Mar 2022 21:44:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6384CC340F2; Tue, 22 Mar 2022 21:44:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985494; bh=ME/RtbfS+u0oOaqRfNDLWI3rW/1j4uR3uNN2Z3ml3A4=; h=Date:To:From:In-Reply-To:Subject:From; b=J+fOALuoVrlpbRT7v3lwq3vVafQxztlTzU7O+A63iQY1SP/OaEFOUs+CD00KbLPt/ 8wJgK5KMPANxALTjUyY3+FLC0Wn6Q/NdyTDWRhR5NDcAt0KD/dT4aUk4NGx7vyUTms RBIWRbZ4FRI6UgPrrxxG0MvxH7fpNoukpa48crK4= Date: Tue, 22 Mar 2022 14:44:53 -0700 To: willy@infradead.org,mgorman@techsingularity.net,david@redhat.com,vbabka@suse.cz,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 126/227] mm, fault-injection: declare should_fail_alloc_page() Message-Id: <20220322214454.6384CC340F2@smtp.kernel.org> Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=J+fOALuo; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: e1mgdxo4sn7i19m5rp91jq6na35tp5xh X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 19BC940033 X-HE-Tag: 1647985494-606952 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: From: Vlastimil Babka Subject: mm, fault-injection: declare should_fail_alloc_page() The mm/ directory can almost fully be built with W=1, which would help in local development. One remaining issue is missing prototype for should_fail_alloc_page(). Thus add it next to the should_failslab() prototype. Note the previous attempt by commit f7173090033c ("mm/page_alloc: make should_fail_alloc_page() static") had to be reverted by commit 54aa386661fe as it caused an unresolved symbol error with CONFIG_DEBUG_INFO_BTF=y Link: https://lkml.kernel.org/r/20220314165724.16071-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Mel Gorman Cc: Matthew Wilcox Cc: David Hildenbrand Signed-off-by: Andrew Morton --- include/linux/fault-inject.h | 2 ++ 1 file changed, 2 insertions(+) --- a/include/linux/fault-inject.h~mm-fault-injection-declare-should_fail_alloc_page +++ a/include/linux/fault-inject.h @@ -64,6 +64,8 @@ static inline struct dentry *fault_creat struct kmem_cache; +bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order); + int should_failslab(struct kmem_cache *s, gfp_t gfpflags); #ifdef CONFIG_FAILSLAB extern bool __should_failslab(struct kmem_cache *s, gfp_t gfpflags); _