Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp477445lqh; Sat, 4 May 2024 08:33:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWXcRjdIQaD6GBWSpcvxX8Uw7RAlYY0k5C9Z3n5Fr5PjgdgNmEAAtQmYtU7GmjOMPjhZK1Npjoli5ah5M39/QLpOLKiCaMVAR2dkGkCuA== X-Google-Smtp-Source: AGHT+IHZR1xWyYdR+Y5TgtTrPham513pc19L0YWx7p0HzT7KxolYyxH8yXAzBf8qJYGIR9gA3ccw X-Received: by 2002:a50:8d5a:0:b0:56c:d35:1775 with SMTP id t26-20020a508d5a000000b0056c0d351775mr4813096edt.35.1714836791517; Sat, 04 May 2024 08:33:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714836791; cv=pass; d=google.com; s=arc-20160816; b=jXRfmF9AWovze2/hqMkPUs5l3RqleEj9uT6BRPy61foi5WK0JuF64wY9xr6Ex5D/0L N/qmLBziEi/lDbkd3nBQOrSgMVcRqK4lhfserjPP7wvzzvWWhprjzU69TK9khYrnhS9f Qt5AeOGMVjMi85r5YXL9xybkdzmRO1AierClkEjRqXeisEgcIVbPJCDE0bFQphBTenKC el5wQ0KCUOqGs2hHHiAXcHBdECNzcClD9dStDeIsJGxMHoF7AyKu1BQBiPl7B90QiEIR KJckoQdYASMF9Z37J9VjvT0UJnQyW5QrFvzujs6QKSbl7sqxYOnaqToAIXNVJUT8Feef DrCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Fwo30BJD0LMI1tLE8XVt3aEB3VgL8ElIaDGcWRFzgWc=; fh=YRTlvleGrLPRjJp/rWoXQJmo/QU+Tn6ZlQlNS8DiDtc=; b=KPJMXNDD5FT3gcgyW3YRe/j63WLfVcIhUFxQrEgpNCxqKA+hcnwaeMwYYjDhYlhUyf 47BIvJSZ71QuYaMjj/vEhN1D7ypGLUEAX9TpSdt/Mf83ZClkIhohdDQD7FoiEFGVZRvA tlYrRUUikHfZRW74wiYF+NFrXhQI8rWloNiQB5qA+1c7Iw7L1EpDAE/z4vNeUZxzaMnM Y/5LusUCZp8IoV4CNrsph+K0yHU5rsg/iwTgpUzVya+G1hiyGXFI8QuHpEDjDu+dpm+y OfaXNkcM/MWtMISCzKEWLsE0bpOn0nHlJseL/G4UaLTeam6KmX6ZeXtOVjw8GfgM9Njh Cgnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TZ6mwWsd; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-168727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 f4-20020a17090631c400b00a5591b85e55si1562865ejf.940.2024.05.04.08.33.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 08:33:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168727-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=@linuxfoundation.org header.s=korg header.b=TZ6mwWsd; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-168727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 413EE1F21A18 for ; Sat, 4 May 2024 15:33:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4506445C04; Sat, 4 May 2024 15:32:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="TZ6mwWsd" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 669163EA9B; Sat, 4 May 2024 15:32:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714836777; cv=none; b=ZkPD2wchNgSoTsLOuXwnaU/xkPItn2c2QLdK7ZVTOQe4hLkC570VzxrJ9c2OWPKs6Wd/AcOz4OjvNavmbjG28Lx4IBW2fvCGGf5F+tcjMZ5rS1rKHKN6BZrnze1C9+J0HXBKBfPnLjZhEPbj91DwMnGzVGvcluHuq0YWvCgX/JY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714836777; c=relaxed/simple; bh=W1KYPkox8fkNsg4FzwVivBA9xyKYIfqdEtzwYk7j8dg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hh9oqnRlImtFykcUm3jjhlR4ryRF3FJLjS6qXwcY5/vlBKlHEsUsLWy9T8JodKjsQqSGdu59oCTU8/EBCMIfclQ77MYs7GfzztrOXNaY36XZlpAlMwUvFrRcB7GwhPz0biaaVp8hSHT6TQjJUALfdIdl6yrc0MNIpLysX+QsIfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TZ6mwWsd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 785E2C072AA; Sat, 4 May 2024 15:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714836776; bh=W1KYPkox8fkNsg4FzwVivBA9xyKYIfqdEtzwYk7j8dg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TZ6mwWsdpO8tPgqajyyjyguNSqGMytj1NkC+qrcAA0JSWWpPfe2SpyL+TxXKbUtWF JPHxRWsmylBL2E0BpXufoXTL0XJqSE6sJkHN1GshLFgv4bRm5mghdHE1gouZE6ONR9 tFk2hgMi/F8dviXNhoSAXLir9gODlgYuhGxYEWGw= Date: Sat, 4 May 2024 17:32:53 +0200 From: Greg KH To: Andrii Nakryiko Cc: linux-fsdevel@vger.kernel.org, brauner@kernel.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 5/5] selftests/bpf: a simple benchmark tool for /proc//maps APIs Message-ID: <2024050425-setting-enhance-3bcd@gregkh> References: <20240504003006.3303334-1-andrii@kernel.org> <20240504003006.3303334-6-andrii@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240504003006.3303334-6-andrii@kernel.org> On Fri, May 03, 2024 at 05:30:06PM -0700, Andrii Nakryiko wrote: > I also did an strace run of both cases. In text-based one the tool did > 68 read() syscalls, fetching up to 4KB of data in one go. Why not fetch more at once? And I have a fun 'readfile()' syscall implementation around here that needs justification to get merged (I try so every other year or so) that can do the open/read/close loop in one call, with the buffer size set by userspace if you really are saying this is a "hot path" that needs that kind of speedup. But in the end, io_uring usually is the proper api for that instead, why not use that here instead of slow open/read/close if you care about speed? > In comparison, > ioctl-based implementation had to do only 6 ioctl() calls to fetch all > relevant VMAs. > > It is projected that savings from processing big production applications > would only widen the gap in favor of binary-based querying ioctl API, as > bigger applications will tend to have even more non-executable VMA > mappings relative to executable ones. Define "bigger applications" please. Is this some "large database company workload" type of thing, or something else? thanks, greg k-h