Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033465AbdI0FGU (ORCPT ); Wed, 27 Sep 2017 01:06:20 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34329 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968158AbdI0FGR (ORCPT ); Wed, 27 Sep 2017 01:06:17 -0400 X-Google-Smtp-Source: AOwi7QBn/yxDvdJBQd2SSjVzX3pbzxfXqbdsQSo1NT6/ciM8VqF6vMWbry34As4brTq1zMa+pATAOA== From: Gargi Sharma To: linux-kernel@vger.kernel.org Cc: riel@surriel.com, julia.lawall@lip6.fr, akpm@linux-foundation.org, mingo@kernel.org, pasha.tatashin@oracle.com, ktkhai@virtuozzo.com, oleg@redhat.com, Gargi Sharma Subject: [PATCH v2 0/2] Replace PID bitmap allocation with IDR API Date: Wed, 27 Sep 2017 01:06:01 -0400 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1936 Lines: 49 This patch series replaces kernel bitmap implementation of PID allocation with IDR API. These patches are written to simplify the kernel by replacing custom code with calls to generic code. The following are the stats for pid and pid_namespace object files before and after the replacement. There is a noteworthy change between the IDR and bitmap implementation. Before text data bss dec hex filename 8447 3894 64 12405 3075 kernel/pid.o After text data bss dec hex filename 3301 304 0 3605 e15 kernel/pid.o Before text data bss dec hex filename 5692 1842 192 7726 1e2e kernel/pid_namespace.o After text data bss dec hex filename 2870 216 16 3102 c1e kernel/pid_namespace.o There wasn't a considerable difference between the time required for allocation of PIDs to the processes. --- Changes in v2: - Removed redundant IDR function that was introduced in the previous patchset. - Renamed PIDNS_HASH_ADDING - Used idr_for_each_entry_continue() - Used idr_find() to lookup pids Gargi Sharma (2): pid: Replace pid bitmap implementation with IDR API pid: Remove pidhash arch/powerpc/platforms/cell/spufs/sched.c | 2 +- fs/proc/loadavg.c | 2 +- include/linux/init_task.h | 1 - include/linux/pid.h | 2 - include/linux/pid_namespace.h | 18 +-- init/main.c | 3 +- kernel/fork.c | 2 +- kernel/pid.c | 239 +++++------------------------- kernel/pid_namespace.c | 54 +++---- 9 files changed, 68 insertions(+), 255 deletions(-) -- 2.7.4