From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 09EE02C for ; Fri, 22 Jul 2016 07:03:09 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AB54B173 for ; Fri, 22 Jul 2016 07:03:08 +0000 (UTC) From: David Howells In-Reply-To: <20160721233333.GD9841@dtor-ws> References: <20160721233333.GD9841@dtor-ws> <87inw1skws.fsf@x220.int.ebiederm.org> <25598.1469113525@warthog.procyon.org.uk> To: Dmitry Torokhov MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11487.1469170986.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Fri, 22 Jul 2016 08:03:06 +0100 Message-ID: <11488.1469170986@warthog.procyon.org.uk> Cc: ksummit-discuss@lists.linuxfoundation.org Subject: Re: [Ksummit-discuss] [CORE TOPIC] More useful types in the linux kernel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Dmitry Torokhov wrote: > > (1) A 'bits' and maybe a 'bits64' type. Currently you have to use un= signed > > long when you want to deploy a flags field with which you're goin= g to use > > test_bit() and co. - but this typically wastes 32 bits on a 64-bi= t arch > > because you can't use bits 32-63 as they might not exist. > = > What is wrong with using DECLARE_BITMAP()? It will allocate exactly as > many unsigned longs You missed my point. *unsigned long* is the issue. The majority of the t= ime that wastes 32 bits on a 64-bit machine - especially when we don't need th= at many flags. On some 64-bit arches we could use unsigned int instead. David