Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp41127ybz; Tue, 21 Apr 2020 04:20:53 -0700 (PDT) X-Google-Smtp-Source: APiQypIJLJCzX4qgVppfHHBy+tgP5VNclGiXOFZchs9nJkMeiomxKhmJVa1wjUTfIEjpwa50mTdg X-Received: by 2002:a17:907:7211:: with SMTP id dr17mr2366813ejc.296.1587468053088; Tue, 21 Apr 2020 04:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587468053; cv=none; d=google.com; s=arc-20160816; b=iv2G/QEPC0UqJWeC14hkENhE9+eCdqj/INaD+cQzLKAznveajZuRDk7n9+Ue0/KGyr fiOCjjzba3icPT36rne6XnCBO/NQZ05zR8t7CioGdWA6STg8+xotKRf7JKpqz7eospyQ vXhllud514Woqita6xcjFmwaHIm/7b6P6qORzNVbcEP0tupOupfcvrFxVP0/QLBWhjrt e0gf71/mjbFnlJf/+nO5q1yt+haD5U/QhM2RW01usCI6KlvT0ARsl6B3Psux/DwaOGS9 SIATFjlOYBUAyn3Nl1hktdEJT6ufoiaGQPNdMPHfGtroXeudDSkfrU3f2TxklnOUQIHD sY0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zTZk99AiK5OjEAUI30e4RyjGcOqu7o/1DlNaNqdP1sM=; b=h5bzElUlMU/YGo/rnNlbH7/wl90aV8f+2Z+nzhOn4zOi6SUg4OnN8M6xf/YHHRHbfp JjVXxt5caHIxFPmKZQJMghrcRTEALDE1EJ6R93s8UgUL4G9o2fU3sAS7SvpNIJv3/1BZ O+IaBjD0vIyQw3Fxdx349WCbjXgKIuxEzfm3ZP6omsfFyVPKFwBGk6r7oApbhrYTM3L5 Dfmsbphi/Al4TD1XiD4qi0TyMcqd6e4wRmui26x2F7+3kCNfDqWX6DlccdEPxE+rjhIw ENgKzZ91vRtLfPk+RBMv3YFJOBr/1WSdvLcT63FlA5AN9kY7rm4EYOWe3hYS135tsdaA CfaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=uPEqZ7eo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o34si1309464eda.249.2020.04.21.04.20.30; Tue, 21 Apr 2020 04:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=uPEqZ7eo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728760AbgDULTD (ORCPT + 99 others); Tue, 21 Apr 2020 07:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728391AbgDULTD (ORCPT ); Tue, 21 Apr 2020 07:19:03 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AFA1C061A0F for ; Tue, 21 Apr 2020 04:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zTZk99AiK5OjEAUI30e4RyjGcOqu7o/1DlNaNqdP1sM=; b=uPEqZ7eoM9Nf+ex2VARi90OFMI BlgWj8s1VbeYfOJ5p6Cp7KjPB40VZvnmVQLet+CiB8Nd85t93MQto0tWtFqjJSdnVtcgBWvo/0syV cW62zgfDK1qOJ1cgJMsqmI0c3pup4O4wOEHKA2XM+fClfAaopNFuK37futYMRraFTtcRYUSZqBSYW zrFsPcgYUP5FNgGqooNzKEy5VK4ZyQOVubtQf0Y5y5mzMDLoBcjLeOz2K4cpCJx4RWqbAPG+4Td84 ScZCQsQJk3CFQBKeXOg/2aF/d+gcP0Oy0PQ92biA8OJ3TGbPzi/4Tmbglq2hkdqFOW0bR5EtiKs8K JsChop9Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQqvR-00034i-FN; Tue, 21 Apr 2020 11:18:49 +0000 Date: Tue, 21 Apr 2020 04:18:49 -0700 From: Matthew Wilcox To: 1587089010-110083-1-git-send-email-bernard@vivo.com Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com, Bernard Zhao Subject: Re: [PATCH V2] kmalloc_index optimization(code size & runtime stable) Message-ID: <20200421111849.GL5820@bombadil.infradead.org> References: <20200421032501.127370-1-bernard@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200421032501.127370-1-bernard@vivo.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 20, 2020 at 08:25:01PM -0700, Bernard Zhao wrote: > kmalloc_index inline function code size optimization and runtime > performance stability optimization. After optimization, the function > kmalloc_index is more stable, the size will never affecte the function`s > execution efficiency. Please stop posting this patch until it's faster *for small sizes*. As I explained last time you posted it, it's not an optimisation. > size time/Per 100 million times > old fun new fun with optimise > 8 203777 241934 > 16 245611 409278 > 32 236384 408419 > 64 275499 447732 > 128 354909 416439 ^^^^ these are the important cases that need to be fast.