Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp619447lqj; Sun, 2 Jun 2024 14:08:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVetxy3esDPx5YwhjTSeOGIch1PzeM51466xsVOIdO/OarfclOmkb3LmlCHAmpU19DBK5mgLGjUckwN/DT4b9ARrMS8jTuHJoj3kFW/4Q== X-Google-Smtp-Source: AGHT+IG2Qs8F0vEKXM9JjbZQ5a2gae/ARQUJb+xERz7TJkbnFNBDnuVLlign+atTzQruHR97puEJ X-Received: by 2002:a17:906:6dcc:b0:a58:725b:a021 with SMTP id a640c23a62f3a-a681fb5fa3dmr441404766b.15.1717362506520; Sun, 02 Jun 2024 14:08:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717362506; cv=pass; d=google.com; s=arc-20160816; b=q7tnJJKuVWbF3vk+p1FkLHDhzZjiE3F/CLwAUC0H0QGrFQUJ0dfTAPQ7MJopMJFxzb pee1X91vkzQGn5CQ6K3EVMNEevj80ufZbJr+nZQguH9ElxETBAHnJHWwfGfyds48fSkO +lsLjcW7jovwgS8EIT3eOKblBHU1EKeNHWEJAWc83irCeAjsF+Dh0H/49T33zYoeV9tE HAwwaEBZ+H+aXlHKsfOilYQ1e4Cdtao+eUyK/eDbhn5rZODfuDOeLmsIV4LGrHW8i8vd gzN5OqxSZjOsOv2e8RWNl1oAFrnbNPbRvp09oj8bOnH7Z53wlJ9BOjZ054VZumVnD+gp mbWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=tQZEL/vbM6wKuOYcR4luQQldeA8eAyr6eXnPVohUWho=; fh=04G5KKksylpL194m/GiTCq9V3hxCb0lsb6hvg883DQ8=; b=RDh+yAIqv6KquIMVQfBfWwG3Rg7WXq+YZ0mgrJCjwuN20MAiC392//SjMU+gy5tDlX eR4feQ6lEN5mclVU9yFztyjkTo8BTv98PEdLfcHb6rAcR0MaPsnCE20KWMBzgPCa1MGO OAzdUV4CrpbQOQm9iJsxAocyN8S1hpyD7/YuEMwbQQ7SGteJLaXG/lii80Hkz0SB51EG omOmoy++Q8BN/EbI/JWWoqXVwkls9AZ4lAm58nawOwy9U1hHXFWS7brgiczCv9HF5yoc O6qzMjDZAHpPebSJ27RKJkfCuxfSq+dtpoDMTpdYXkE+JjqYRfrX/r+/Je5S82qgZlRg +2iA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=xAoIyPs2; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=xAoIyPs2; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=aSXhDgJ9; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-198440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198440-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68fe20a497si73329566b.575.2024.06.02.14.08.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 14:08:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=xAoIyPs2; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=xAoIyPs2; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=aSXhDgJ9; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-198440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198440-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 154A81F21232 for ; Sun, 2 Jun 2024 21:08:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00EC778283; Sun, 2 Jun 2024 21:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="xAoIyPs2"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="aSXhDgJ9"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="xAoIyPs2"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="aSXhDgJ9" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FCC08493; Sun, 2 Jun 2024 21:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717362495; cv=none; b=kP6Whzf+TBZGLid+N7G3bLPBlM2MUdEJiDq6ljI4Ybv9SbFisiiNHRHz5KeFBc8lXAto5IVVCY5I89jdnNBlASpfwYzi1tMoLFbcV8Ny8jAzLGrY9Gk/Y3AMBOt3IqvMZM3tv+hdMTDL4QDyANs5aEmsW3zdrC90Wlu7hdRxNug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717362495; c=relaxed/simple; bh=QASph2uY1fq4HnU0wZtjG1pIF1jvY+VFOelBy4FoHog=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZaU6w+j8dZjZMm4tEq5w/b1pyHkIs2PfN5U3AntJQTm2u8xPue2YQIbQD6nRjNZICuBr4XojqrIJN7WRC0YByTpMhqRJhLwmGan19eMlzDkaLx4ykyKhKo1vwd1RnXKgYsV1Fov4VvJIHynFoIqZMH80diRIsKcyPBTVpb0KvW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=xAoIyPs2; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=aSXhDgJ9; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=xAoIyPs2; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=aSXhDgJ9; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2501022134; Sun, 2 Jun 2024 21:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717362491; 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:autocrypt:autocrypt; bh=tQZEL/vbM6wKuOYcR4luQQldeA8eAyr6eXnPVohUWho=; b=xAoIyPs2nTlPuXCvTy9BLDzkeK3XIxu4KrdpEnjl8vEwe1c5tZwUZwxCH9m1GJS3l8kOEo q6cU7KRkvTGXBdt/ZklFK4Y/pIKfOXxsRxWGpFj5LYVdvOUaJpsqyDz6m+mVa3Dyc6pJUO NMEI8sToe2CKOO3/KmRsV2aQCeEaKYc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717362491; 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:autocrypt:autocrypt; bh=tQZEL/vbM6wKuOYcR4luQQldeA8eAyr6eXnPVohUWho=; b=aSXhDgJ9nCrdqhhFTzYHoMz8jOuP0qkmQxZazYXkE/ROGrigeg61nXgB+kMyfXujAaFchM piBSnd/cL+qA+FAA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=xAoIyPs2; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=aSXhDgJ9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717362491; 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:autocrypt:autocrypt; bh=tQZEL/vbM6wKuOYcR4luQQldeA8eAyr6eXnPVohUWho=; b=xAoIyPs2nTlPuXCvTy9BLDzkeK3XIxu4KrdpEnjl8vEwe1c5tZwUZwxCH9m1GJS3l8kOEo q6cU7KRkvTGXBdt/ZklFK4Y/pIKfOXxsRxWGpFj5LYVdvOUaJpsqyDz6m+mVa3Dyc6pJUO NMEI8sToe2CKOO3/KmRsV2aQCeEaKYc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717362491; 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:autocrypt:autocrypt; bh=tQZEL/vbM6wKuOYcR4luQQldeA8eAyr6eXnPVohUWho=; b=aSXhDgJ9nCrdqhhFTzYHoMz8jOuP0qkmQxZazYXkE/ROGrigeg61nXgB+kMyfXujAaFchM piBSnd/cL+qA+FAA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id ECED713A97; Sun, 2 Jun 2024 21:08:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ZW4ROTrfXGbvOQAAD6G6ig (envelope-from ); Sun, 02 Jun 2024 21:08:10 +0000 Message-ID: Date: Sun, 2 Jun 2024 23:08:10 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 0/4] static key support for error injection functions To: David Rientjes Cc: Akinobu Mita , Christoph Lameter , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu , Steven Rostedt , Mark Rutland , Jiri Olsa , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, linux-trace-kernel@vger.kernel.org References: <20240531-fault-injection-statickeys-v1-0-a513fd0a9614@suse.cz> <71ebaa45-dbd0-b39d-4b33-88da3f497297@google.com> Content-Language: en-US From: Vlastimil Babka Autocrypt: addr=vbabka@suse.cz; keydata= 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 EP+ylKVEKb0Q2A== In-Reply-To: <71ebaa45-dbd0-b39d-4b33-88da3f497297@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [-3.00 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; XM_UA_NO_VERSION(0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; ARC_NA(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_TWELVE(0.00)[19]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; FREEMAIL_CC(0.00)[gmail.com,linux.com,kernel.org,iogearbox.net,linux.ibm.com,intel.com,davemloft.net,goodmis.org,arm.com,linux.dev,vger.kernel.org,kvack.org]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_RCPT(0.00)[]; DWL_DNSWL_BLOCKED(0.00)[suse.cz:dkim]; DKIM_TRACE(0.00)[suse.cz:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:dkim,suse.cz:email] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 2501022134 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -3.00 On 6/2/24 10:47 PM, David Rientjes wrote: > On Fri, 31 May 2024, Vlastimil Babka wrote: > >> Patches 3 and 4 implement the static keys for the two mm fault injection >> sites in slab and page allocators. For a quick demonstration I've run a >> VM and the simple test from [1] that stresses the slab allocator and got >> this time before the series: >> >> real 0m8.349s >> user 0m0.694s >> sys 0m7.648s >> >> with perf showing >> >> 0.61% nonexistent [kernel.kallsyms] [k] should_failslab.constprop.0 >> 0.00% nonexistent [kernel.kallsyms] [k] should_fail_alloc_page ▒ >> >> And after the series >> >> real 0m7.924s >> user 0m0.727s >> sys 0m7.191s >> >> and the functions gone from perf report. >> > > Impressive results that will no doubt be a win for kernels that enable > these options. Oh, I should have been more clear about it. This was done with both of these options disabled. It's measuring just removing the overhead of calling the empty noninline function, otherwise the difference would be larger. CPU mitigations (defaults) were enabled though, which affects the cost of function calls (this was in KVM guest on Ryzen 2700). > Both CONFIG_FAILSLAB and CONFIG_FAIL_PAGE_ALLOC go out of their way to > have no overhead, both in performance and kernel text overhead, when the > .config options are disabled. Except the unavoidable function call overhead since commits 4f6923fbb352 and af3b854492f3. > Do we have any insight into the distros or users that enable either of > these options and are expecting optimal performance? I would have assumed > that while CONFIG_FAULT_INJECTION may be enabled that any users who would > care deeply about this would have disabled both of these debug options. Eliminating the empty function call overhead, which is currently not possible to configure out in any way, was my primary goal. For our distro we disable the options and they are enabled only in a debug kernel option. So the additional benefit of the static key is we could enable them with no cost, and have them available for when needed, without the need to change kernel. This is great for debugging functionality in general (debug_pagealloc, page_owner), maybe this would be less likely to be useful, but one never knows. >> There might be other such fault injection callsites in hotpaths of other >> subsystems but I didn't search for them at this point. >> >> [1] https://lore.kernel.org/all/6d5bb852-8703-4abf-a52b-90816bccbd7f@suse.cz/ >> [2] https://lore.kernel.org/all/3j5d3p22ssv7xoaghzraa7crcfih3h2qqjlhmjppbp6f42pg2t@kg7qoicog5ye/ >> >> Signed-off-by: Vlastimil Babka >> --- >> Vlastimil Babka (4): >> fault-inject: add support for static keys around fault injection sites >> error-injection: support static keys around injectable functions >> mm, slab: add static key for should_failslab() >> mm, page_alloc: add static key for should_fail_alloc_page() >> >> include/asm-generic/error-injection.h | 13 ++++++++++- >> include/asm-generic/vmlinux.lds.h | 2 +- >> include/linux/error-injection.h | 9 +++++--- >> include/linux/fault-inject.h | 7 +++++- >> kernel/fail_function.c | 22 +++++++++++++++--- >> lib/error-inject.c | 6 ++++- >> lib/fault-inject.c | 43 ++++++++++++++++++++++++++++++++++- >> mm/fail_page_alloc.c | 3 ++- >> mm/failslab.c | 2 +- >> mm/internal.h | 2 ++ >> mm/page_alloc.c | 11 ++++++--- >> mm/slab.h | 3 +++ >> mm/slub.c | 10 +++++--- >> 13 files changed, 114 insertions(+), 19 deletions(-) >> --- >> base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 >> change-id: 20240530-fault-injection-statickeys-66b7222e91b7 >> >> Best regards, >> -- >> Vlastimil Babka >> >>