Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp648055ima; Fri, 15 Mar 2019 10:49:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvfupJAYvqxOZV2XDrwnx13OnY7rvcM4FPeznUnnNyroR5SZOYZN0zU0VgbuNzZUcM+Sy2 X-Received: by 2002:a65:614f:: with SMTP id o15mr4548480pgv.383.1552672148215; Fri, 15 Mar 2019 10:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552672148; cv=none; d=google.com; s=arc-20160816; b=oUTKQNYMWhBdSPacmD6C7mCTrkSZSw9ApzJQosu7sVHmlu1DT2FimGxJBNVm+eh7HO PSPwmMfEZW3j4qpuaSKT17KYrwWXkTPRHw9QfnBSnSu1SlBfHXP9JKVF+Vn89SQ3PEj1 Kv8+ztjb+cWx0Rsw2KKVO49BtVEZh8WY6mQMgsTjfF0WdcjS5RDpEH7RsjJfg6Fo+r/1 EoBrCDPEJxZNIzAlnToI/kql6EpOj7dhT94jhtWWLRibIPoVdK6eUqckTxJ79iRoegTC sheK0fUmS1GtEMaoX+EZekmFWdbS81xWcdHixkkhedbfUKrP+FFhmfjEkHSExpkuXP0I x5bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=na1eTKhA2rjuqGwUwBV9vCpYJ58yHfP9847Gxnpwh2M=; b=Rac87lruyn7Kr8rjCdQxHRDj3few0MYsz2GYkP6rEYvPnVbHm8taeE5JsZA+M23KE/ SQFg/T7UgmKMLUhGQycS9wQmNL6C7xPvtjqREMtsSsCoKOCpVbYjlnZBrwu9WVlnvpNH fx6eLyY7ArYPRMj1U7hT/CHykNIbLWAkNsS9ZyaNs/ySukXnz30kveekUKdPmNSJUIlM v5mRkZkEnohoqjM4Bby5qn6746UKup0JPTJuDN97Qc7a5x8eIHnykjCh9gUpjYz9tPLq fAubpLf+hjtUq5a7bIRrvxfAW794RJiRtYzV+YE+fghWUXsuZL8pM6Wr+6JI08WSaK/E UZpw== 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 q77si2538239pfa.102.2019.03.15.10.48.51; Fri, 15 Mar 2019 10:49:08 -0700 (PDT) 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 S1726782AbfCORr6 (ORCPT + 99 others); Fri, 15 Mar 2019 13:47:58 -0400 Received: from mail-ua1-f66.google.com ([209.85.222.66]:34628 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfCORr5 (ORCPT ); Fri, 15 Mar 2019 13:47:57 -0400 Received: by mail-ua1-f66.google.com with SMTP id c6so900853uan.1 for ; Fri, 15 Mar 2019 10:47:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=na1eTKhA2rjuqGwUwBV9vCpYJ58yHfP9847Gxnpwh2M=; b=r2uw+W2KWh4RciFWh42qqyoMmDYQwluHibkIOWOFbhVMLbu9VUss49kG00rE6gPhvf 6CpllVIzDO9YjU3c0vGwLuFZDoQk2kH2iDZWyS4CptfV+MvF59QZNpMaCnF18gk1yXcB zOJjWHSezbGeAzZK9dfZJfiRzMYqGw/FRMEzAr3EpUo8+2gKKB2RQWqzw4MvbvIpPbec dt6v1id5Ph6XyxzCZ8hWe9I9ny+PpkGzFPjqjMWr2pI8uSRad04C2va57DseUEOMwdBO uOfjmTEehNon3IanGe2nOO/FhDvANd+d6Ryx978lyGOmesNTWMYILEAD6rC2cLu5nuTX /q7w== X-Gm-Message-State: APjAAAXXRJxjUqcWggItXtIAJ3T9nJIHXc4SjOQoXzcR2lwmSzPf8bz4 9QOK8vQs6uJnAWlLtT7vVAxktjK59w+fmDqrgNw= X-Received: by 2002:ab0:1342:: with SMTP id h2mr344708uae.47.1552672076711; Fri, 15 Mar 2019 10:47:56 -0700 (PDT) MIME-Version: 1.0 References: <20190314091041.GU9224@smile.fi.intel.com> <201903150433.x2F4X9oT024601@sdf.org> <201903151023.x2FANDVY013031@sdf.org> <201903151659.x2FGxi3R012970@sdf.org> In-Reply-To: <201903151659.x2FGxi3R012970@sdf.org> From: Geert Uytterhoeven Date: Fri, 15 Mar 2019 18:47:44 +0100 Message-ID: Subject: Re: [PATCH 4/5] lib/list_sort: Simplify and remove MAX_LIST_LENGTH_BITS To: George Spelvin Cc: Andrew Morton , Andy Shevchenko , Daniel Wagner , Dave Chinner , Don Mullis , Linux Kernel Mailing List , Rasmus Villemoes , Andrey Abramov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi George, On Fri, Mar 15, 2019 at 5:59 PM George Spelvin wrote: > On Fri, 15 Mar 2019 at 13:57:05 +0100, Geert Uytterhoeven wrote: > > On Fri, Mar 15, 2019 at 11:23 AM George Spelvin wrote: > >> On Fri, 15 Mar 2019 at 09:20:58 +0100, Geert Uytterhoeven wrote: > >>> On Fri, Mar 15, 2019 at 5:33 AM George Spelvin wrote: > >>>> One question I should ask everyone: should "count" be 32 or 64 bits > >>>> on 64-bit machines? That would let x86 save a few REX bytes. (815 > >>>> vs. 813 byte code, if anyone cares.) > >>>> > >>>> Allegedy ARM can save a few pJ by gating the high 32 > >>>> bits of the ALU. > >>>> > >>>> Most other 64-bit processors would prefer 64-bit operations as > >>>> it saves masking operations. > > > > So just make it unsigned int, unconditionally. > > As I wrote originally (and quoted above), other 64-bit machines don't > have 32-bit operations and prefer 64-bit operations because they don't > require masking. x86 (for historical compatibiity) and ARM (for power > saving) are the ones that come to mind. > > I'm trying to present the case to spur discussion, but it realy is > a *question* I'm asking about whether to do that, not a suggestion > phrased as a question. If it's just x86_64, use size_t everywhere, and let them suffer, for not being real 64-bit ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds