From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755228AbdJKWhb (ORCPT ); Wed, 11 Oct 2017 18:37:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39222 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754085AbdJKWhS (ORCPT ); Wed, 11 Oct 2017 18:37:18 -0400 Date: Wed, 11 Oct 2017 15:37:16 -0700 From: Andrew Morton To: Gargi Sharma Cc: linux-kernel@vger.kernel.org, riel@surriel.com, julia.lawall@lip6.fr, mingo@kernel.org, pasha.tatashin@oracle.com, ktkhai@virtuozzo.com, oleg@redhat.com, ebiederm@xmission.com, hch@infradead.org, lkp@intel.com, tony.luck@intel.com Subject: Re: [PATCH v6 1/2] pid: Replace pid bitmap implementation with IDR API Message-Id: <20171011153716.5cd0689bb7030b886b0d62f9@linux-foundation.org> In-Reply-To: <1507760379-21662-2-git-send-email-gs051095@gmail.com> References: <1507760379-21662-1-git-send-email-gs051095@gmail.com> <1507760379-21662-2-git-send-email-gs051095@gmail.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Oct 2017 18:19:38 -0400 Gargi Sharma wrote: > This patch replaces the current bitmap implemetation for > Process ID allocation. Functions that are no longer required, > for example, free_pidmap(), alloc_pidmap(), etc. are removed. > The rest of the functions are modified to use the IDR API. > The change was made to make the PID allocation less complex by > replacing custom code with calls to generic API. I still don't understand the locking. spin_lock_irq(&pidmap_lock) in some places, rcu_read_lock() in others. If the locking is indeed now correct, can we please get it fully documented? A comment at the pid_namespace.idr definition site would suit.