Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp140022imu; Thu, 8 Nov 2018 06:15:26 -0800 (PST) X-Google-Smtp-Source: AJdET5e2HOwFs1nfnWIfoSP8vjn7rhXDo1F87WH4I+bxgeLvaXrtHjWird1eCL50XP9W45RM/sMs X-Received: by 2002:a17:902:3a5:: with SMTP id d34-v6mr4728011pld.110.1541686526881; Thu, 08 Nov 2018 06:15:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541686526; cv=none; d=google.com; s=arc-20160816; b=r7JX+io1ImtB63NM3Yz2SGO4rGV6LzvJ/YvLVdsFwCpH7ERJYlxO3TwMI4ST7vphEL hLfrPlYzaJPvmWuBqfo9xL2KKxF4YcdftqnWUBDTXkDsigGtYHfx/GffOyyi2g9bh6oW zOch2/cpd0CMZO5/t8PIGfL7VUCd6JATM40mzRcFAcyEimLxBUbwH+grV8jl3WkQxPN9 x2QCu9BprhH6LEEWXUXsRyWdJg9bmdN1xwXWIpMuala+2e1MyKtHFJ0SM2d1VS6UgAHZ T8G9VNrovkRds9+cRmy5vCFbWMPhlHd+n26HtID7S3K4o+vBOSytytAx+i95iroeFJU0 Qegg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=igqmOUTXdevaWrCriruqS+FUcO06H/j0OnyuBS9CB3w=; b=qFeDr3ADMY5dfTvv2svz6aHra0m+EE8ZoZGPE3wx06h5rKjHW6fJePvRr1JLiRGudK 0QLeBoy8FWiP/S0oI5iAVgPQWJq4BoHU4JlpyZKGCudRJ9q3L7VbjqpkuipiXH1OMJlu DMeTY+T7CYR78kHT+SkK3RVeexEmBz8NPkoxmeVwcQ/jNoHVkQSO22E24cwx5O7YheZy cGe4js73m50zWLgZ06f6GSzWYLntS//nzB23E+lRPf+etBth4wDl4YcM6xMVCQwr+A6y ozbD7mRf2/sqjHquGOYrNJBVHizpqGk9fgnuqktgE0XgD/YItDYGCjVfMWLRxkpjgNGP 9WUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18-v6si4916581pfd.163.2018.11.08.06.15.10; Thu, 08 Nov 2018 06:15:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727020AbeKHXtv convert rfc822-to-8bit (ORCPT + 99 others); Thu, 8 Nov 2018 18:49:51 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:33476 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbeKHXtv (ORCPT ); Thu, 8 Nov 2018 18:49:51 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by dkim.mimecast.com with ESMTP id uk-mta-170-YmVjI1zYPXiXgm4h7P2Yug-1; Thu, 08 Nov 2018 14:14:08 +0000 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 8 Nov 2018 14:14:14 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Thu, 8 Nov 2018 14:14:13 +0000 From: David Laight To: 'Matthew Wilcox' CC: 'Martin Steigerwald' , Michal Hocko , Daniel Colascione , linux-kernel , "rppt@linux.ibm.com" , Tim Murray , Joel Fernandes , "Suren Baghdasaryan" , Jonathan Corbet , "Andrew Morton" , Roman Gushchin , "Mike Rapoport" , Vlastimil Babka , "Kirill A. Shutemov" , "Dennis Zhou (Facebook)" , Prashant Dhamdhere , "open list:DOCUMENTATION" Subject: RE: [PATCH v2] Document /proc/pid PID reuse behavior Thread-Topic: [PATCH v2] Document /proc/pid PID reuse behavior Thread-Index: AQHUdrwX3PD+XlfhcUeFEtVp7YMP66VFxCRggAALTYCAABOvMIAACBKAgAAA+qA= Date: Thu, 8 Nov 2018 14:14:13 +0000 Message-ID: References: <20181031150625.147369-1-dancol@google.com> <20181107160015.GI27423@dhcp22.suse.cz> <4536090.43ZsV6LvYe@merkaba> <0c5610f128fa49fb9d8f7859e6f61b90@AcuMS.aculab.com> <20181108122747.GM3074@bombadil.infradead.org> <47072118046a450b904556ca8154f5c9@AcuMS.aculab.com> <20181108140707.GO3074@bombadil.infradead.org> In-Reply-To: <20181108140707.GO3074@bombadil.infradead.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: YmVjI1zYPXiXgm4h7P2Yug-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox > Sent: 08 November 2018 14:07 ... > > You'd be looking for something like dynamic perfect hashing then? > I think that'd make a great project for someone to try out. I don't > have the time to look into it myself, and I'm not convinced there's > a real workload that would benefit. But it'd be a great project for > a university student. Been there, done that several times. Half an afternoon's work. I'm surprised there isn't a C++ container class that will give you a 'id' for a pointer (or other large value). But they all do it the other way around. It is also trivial to double the size of the array and 'unzip' the allocated items into their correct halves while adding the other entry to the free list. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)