From patchwork Mon Mar 14 16:57:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 12780505 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 72DF9C433EF for ; Mon, 14 Mar 2022 16:57:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 832306B0071; Mon, 14 Mar 2022 12:57:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 792948D0003; Mon, 14 Mar 2022 12:57:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A84E6B0073; Mon, 14 Mar 2022 12:57:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 32FB46B0072 for ; Mon, 14 Mar 2022 12:57:35 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id ED0702401E for ; Mon, 14 Mar 2022 16:57:34 +0000 (UTC) X-FDA: 79243598028.06.DB6201D Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf28.hostedemail.com (Postfix) with ESMTP id 25869C0011 for ; Mon, 14 Mar 2022 16:57:33 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (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-out2.suse.de (Postfix) with ESMTPS id B45C41F380; Mon, 14 Mar 2022 16:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1647277052; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EjQj53Mw0YNh700fK1Icsq6ho1Eko/PdYkCQNR6mqrE=; b=gugqY4B+djL/nhmH2nhDAdJV9P41rQYJ2g8SWA9aCiKiiKSdP2+uGZsC4sPdnLQ8fOgSCH qSm6oJPE6pYN89aep1Xr1FKgtz60j1MreAp0B6P5lM0t/5RqEp9n8OdcaLZGDVga6OGmeo UaWZx+zlPEUkeANI0uWQ9uIAZDXJ17E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1647277052; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EjQj53Mw0YNh700fK1Icsq6ho1Eko/PdYkCQNR6mqrE=; b=fnCZrvmEeOA7aH1I0CkzTH1mPfrTtZJOzoyH8BmBVce8WgahkZwgQgUp/95n0M8XfYcZLU 0/4ZOUhnIT9ymwAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (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 imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8994213B39; Mon, 14 Mar 2022 16:57:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id RbYpIPxzL2I+PAAAMHmgww (envelope-from ); Mon, 14 Mar 2022 16:57:32 +0000 From: Vlastimil Babka To: Andrew Morton , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Mel Gorman , Matthew Wilcox , David Hildenbrand , Vlastimil Babka Subject: [PATCH 1/2] mm, fault-injection: declare should_fail_alloc_page() Date: Mon, 14 Mar 2022 17:57:23 +0100 Message-Id: <20220314165724.16071-1-vbabka@suse.cz> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1119; h=from:subject; bh=QGoL6qUI09dpG/35dBQDgHemHz/FCAGmqGRnNq+rios=; b=owEBbQGS/pANAwAIAeAhynPxiakQAcsmYgBiL3Pyn7opOzfCBHWa660u1sfUHhTXqveiKMNIEZ6Q pT5b1QiJATMEAAEIAB0WIQSNS5MBqTXjGL5IXszgIcpz8YmpEAUCYi9z8gAKCRDgIcpz8YmpEMjmCA C9dqVWnbqOG9kRwx4yBIUGJqbzVqSalN5zHjMGiyDG9PUa8Mnsw9v6WJnWG1gaXlTYM2UMkddxUri0 kEpkTc6qNrYCiVzwkr8MVCFU9JEDYmIkPz/EBljtAn0cjEZnHhcM5BVQeJ5J48dZzz25H4PgSc1bW5 FKbXmRop8pWwllwouudA5m0JJrLP+IeNyEC/GPxsTJGWqpiCFEmBpdJSJWDxoCf5jEax4yqzbwKUnj jAcBl7tnK4lVHEyhafgDiTGXts1HxQWuXkWqLza096bE/p3c0aJKNWEU43yOANIOKTZN/vJ9X4Kycb ZThdDMOsM+5NMxrU4PpYv+0bfjRDxj X-Developer-Key: i=vbabka@suse.cz; a=openpgp; fpr=A940D434992C2E8E99103D50224FA7E7CC82A664 X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 25869C0011 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=gugqY4B+; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=fnCZrvmE; spf=pass (imf28.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspam-User: X-Stat-Signature: 5qc6kxaa5ggjy1qkszf8egxxst8nsggm X-HE-Tag: 1647277053-861638 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: 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 Signed-off-by: Vlastimil Babka --- include/linux/fault-inject.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h index e525f6957c49..2d04f6448cde 100644 --- a/include/linux/fault-inject.h +++ b/include/linux/fault-inject.h @@ -64,6 +64,8 @@ static inline struct dentry *fault_create_debugfs_attr(const char *name, 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);