Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbdIFJEO (ORCPT ); Wed, 6 Sep 2017 05:04:14 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:34697 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbdIFJEL (ORCPT ); Wed, 6 Sep 2017 05:04:11 -0400 X-Google-Smtp-Source: ADKCNb7WWyu7haDkyOWGTI6JkSA4Ou8njxrmg+VDCX2DcT1l8znVuxmN7L6wzKkllhDPIPwJDUyLdOuQNtIxOJDDp8E= MIME-Version: 1.0 In-Reply-To: References: <20170905190500.GA13746@avx2> <20170905155320.a683a4853b21a3be32d8b529@linux-foundation.org> From: Alexey Dobriyan Date: Wed, 6 Sep 2017 12:04:09 +0300 Message-ID: Subject: Re: [PATCH 1/2] pidmap(2) To: Randy Dunlap Cc: Andrew Morton , Tatsiana Brouka , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Aliaksandr Patseyenak Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1295 Lines: 35 On 9/6/17, Randy Dunlap wrote: > On 09/05/17 15:53, Andrew Morton wrote: >> On Tue, 5 Sep 2017 22:05:00 +0300 Alexey Dobriyan >> wrote: >> >>> Implement system call for bulk retrieveing of pids in binary form. >>> >>> Using /proc is slower than necessary: 3 syscalls + another 3 for each >>> thread + >>> converting with atoi(). >>> >>> /proc may be not mounted especially in containers. Natural extension of >>> hidepid=2 efforts is to not mount /proc at all. >>> >>> It could be used by programs like ps, top or CRIU. Speed increase will >>> become more drastic once combined with bulk retrieval of process >>> statistics. >> >> The patches are performance optimizations, but their changelogs contain >> no performance measurements! >> >> Demonstration of some compelling real-world performance benefits would >> help things along a lot. >> > > also, I expect that the tiny kernel people will want kconfig options for > these syscalls. We'll add it but the question if it is a good idea. Ideally these system calls should be mandatory and /proc optional. $ size kernel/pidmap.o fs/fdmap.o text data bss dec hex filename 560 0 0 560 230 kernel/pidmap.o 617 0 0 617 269 fs/fdmap.o