Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1702594imm; Mon, 3 Sep 2018 07:19:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbFREWkP0jJzhg6ivJoCjAbh6cQ3+IEBmYj+rim2hwbmUewveRUaYWWvp8DXEW1E0Q0Tzvo X-Received: by 2002:a62:9349:: with SMTP id b70-v6mr29998627pfe.193.1535984392783; Mon, 03 Sep 2018 07:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535984392; cv=none; d=google.com; s=arc-20160816; b=Ti3MA8FxdkCmmvRC7WVsjOAIHRb3wiX3FlWr+fYBEEyPPprrMBtrr5/VhhKOIL9+Rx h6NYiWK4MF2f2kTiBo4jytcnzi6hwZcglYBhyouz9/KnWjmVNs/BMGcjQFr3ov+YPoZQ uhx5e76TgFu33SHuKZAGRluBmc3f9J7dEDB/RN8+pjG7UDV3QjYa1LadD5vu4zMm5aSk 8rWO0i5iCxTf8Uw3kbHuhf1sAJuf1c0t/Skni24hQ1Rhs2Ghr0sVHlQEMXYlurYp0IL+ fQ/Z4jlRKoJQ7oDdmwVwlkUTvzHvI4Go0vMF1dudDyj1YA8JTKGE9ojbG0delCWTh5ZE lt/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=YYvuE2p7XKZLDZsmuOPxtSmrOTzfho+3vfTdkCBoOUo=; b=KaCCXVL5k8XgLs3B8x0drRCrwQww5nzAvjJeB4I7s9t9dhq3jX/jVZBBsjvoUvOEUo IQfoeHv5km6v3YPOJ2eidw27zeHv3L1CZrzeTz4Ib4I+4HCKaaLWc+ixLAoPxskihr2A U0LPDI5B9eepnzhAl3oXlYCO2j4J6TjOLwxoRXv18aGKOL10CNz0+ZIRn1Vf0nqIhC6J 5KwUVNrdjxl3ECx+q3R8Q15eYG1RkM+eEh2deIrXvoYc6bFB3BMNDF7OMe8n7yfk9RGQ 4THq0iH1+LMEGwDGu4RcnxbEaa96+uh3Z4bvQSP8HVov2+Xl342g4ZtaIhhG/zNj6iVg DXZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rxVPAGH5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9-v6si17965584plk.427.2018.09.03.07.19.37; Mon, 03 Sep 2018 07:19:52 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rxVPAGH5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727482AbeICSi0 (ORCPT + 99 others); Mon, 3 Sep 2018 14:38:26 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:50177 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727112AbeICSi0 (ORCPT ); Mon, 3 Sep 2018 14:38:26 -0400 Received: by mail-wm0-f67.google.com with SMTP id s12-v6so1387137wmc.0 for ; Mon, 03 Sep 2018 07:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YYvuE2p7XKZLDZsmuOPxtSmrOTzfho+3vfTdkCBoOUo=; b=rxVPAGH5b0KwujJ1tw3iV9JFy0r3l7Kv/7iX+BW1k2/dIatho3C6kKmyqwhHJjHGJg LxkDLmE+1zlbisFIcM4I4O1V+/ksD7+bBDeYFI5syUCEML4tJewarbJFyHFRWwZ+16w/ xtKAwibfLJ46xa/jX3f4tglcx7jcqfRQQOSwd1KJxuHFoe3MyLxFyujJMlg7X/rf/8hN wTglfQ61SQ90Kj+Cs1VjzJFTSNkrONwsJFhjdPl25Sgg0kqy6hPR9HNwZobH2uVdDN2U pLEGowtc3T0ZNgLDSxwxpEwsnBl/n8fI64CinnHfetZAjWLmKgl7VmXz5zpPbE4W1it3 cF4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YYvuE2p7XKZLDZsmuOPxtSmrOTzfho+3vfTdkCBoOUo=; b=KX+0vojtznpfwZJgQG0N1puPDCfja8LNmVs6ZL99Kggflj9kQ1V+z+AHTsrehsKHdc lfeUhto7zl7a4mPUmRnuc4ldjx96NUuCdWXzUJ4Z/gDYAwrL6PCJZbL3W4JYNukrkuIa bVg8/24xldKCYa0D1r5iif7AAXEIDIQl0Zxfoq1RE3TPISAKnqg7HFrLoidbm4MqwJIG 1BHjujP+8YnmbovlpJJs8q8sQmAgo8xagIGnLafYtNMImY6QhSqKFDzHareAgyWchlkm Wj1mdc0cAVxeouM1jZkVtKjmNRTZI+BuTCPrXts+/27li/IxcV4a5cIDlX3ldse6SDlm NNCQ== X-Gm-Message-State: APzg51CnA5jJzZ3/G+K+zOQAy7Etde8lzwOKdg+ukU3mQste1ottqqlg +x0tjg1OYkN3XcM3MzT+7GHMo0w= X-Received: by 2002:a1c:82c8:: with SMTP id e191-v6mr5035211wmd.35.1535984282124; Mon, 03 Sep 2018 07:18:02 -0700 (PDT) Received: from avx2 (nat4-minsk-pool-46-53-177-92.telecom.by. [46.53.177.92]) by smtp.gmail.com with ESMTPSA id y206-v6sm13550237wmg.14.2018.09.03.07.18.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 07:18:01 -0700 (PDT) Date: Mon, 3 Sep 2018 17:17:59 +0300 From: Alexey Dobriyan To: joe@perches.com Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: Re: [PATCH 01/13] seq_file: rewrite seq_puts() in terms of seq_write() Message-ID: <20180903141759.GA11586@avx2> References: <20180827231503.26899-1-adobriyan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180827231503.26899-1-adobriyan@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Joe Perches wrote: > > If execution speed is really an issue, as > > almost all of the uses are for const strings, > > why not use a #define and avoid the runtime > > cost of strlen where possible. > > fyi: an x86-64 defconfig increases < .5 kb and > presumably is faster for most all seq_puts uses > -void seq_puts(struct seq_file *m, const char *s); > +#define seq_puts(m, s) seq_write(m, s, strlen(s)) I don't know, seq_puts() patch was last minute observation. It is independent of _print_integer() stuff. Your version should be "static inline" of course.