Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2146575imu; Sun, 18 Nov 2018 17:03:53 -0800 (PST) X-Google-Smtp-Source: AJdET5eLL0cNjjX+YuShjLvdUGgn9pPIZRzt5O/pz+EpYij+r4Sp6yjMAPlSC2H659O/T6uefdCV X-Received: by 2002:a17:902:6b01:: with SMTP id o1-v6mr20558241plk.333.1542589433866; Sun, 18 Nov 2018 17:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542589433; cv=none; d=google.com; s=arc-20160816; b=NbS4elfm796/wu9YaOBYcCjxF1zr1HBXWF7C9lNAlXKx/dI96+ieakDBShMTYO1nxi DJ3lK7ug+V0ZxEPig2Q/gfZpC/KdcXpEI146bG3rDiPA71gLw4Ykhbbu6Z0jV3C3KgIf wF2GIctbquPtdQWNRvkJ/AnO9EfZWvIqKGNJdrza8m7iT1lw90qCf2fzCB5DdM6aZGfX WK14LAD6rj1GICRcXL19SUQAofQ3bBNBasxTM5ykw9CTSh4Zq3dSZpQW1pdlwOk8AJtZ kmPRfemwCmYcqOv4RsOxFkZwow/3vSDLJblMEG7E60nivKxDX8LXPGuUsAKHHhg/npHd PmEA== 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; bh=zarwFY8/rYKpT8HEb383ruGvAwzj654iYYR5hS4DF20=; b=zQCfSpxAhCOuxiLiuhpEsX1CZjjsgQ7a6ery0Y6MO78B2SHiEynXjtb8ioRwY7AoIP H6kUwI0l5GRFpuMjrwJboZ+BXN4TIb/7YBYOjggGYbaKbiUIT0PbyoVaOopJVHf9P5CA TRFyqCowD9UL8P+XYL4FnW9l7C2Ib1Rje9fhViOsFsfLdkoCzgN6th/0fjY/porDvBMi 4ebvsR8HxeADnLXsRdv+rJv96T8CmPIzc7PBE8YqMhy1IWdWP5hjuEWfWurhKOJFiDEW DUYueJ7P+IOgTzP0iePc6LRsh4SzN6f5omEi1OOa6pSwmgPX7C/F4gafFXqc0KSVcO5F 4+MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Ds8ssu0v; 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 g21si26853222pgl.114.2018.11.18.17.03.38; Sun, 18 Nov 2018 17:03:53 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Ds8ssu0v; 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 S1726903AbeKSLYz (ORCPT + 99 others); Mon, 19 Nov 2018 06:24:55 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:57784 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbeKSLYz (ORCPT ); Mon, 19 Nov 2018 06:24:55 -0500 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=zarwFY8/rYKpT8HEb383ruGvAwzj654iYYR5hS4DF20=; b=Ds8ssu0vYG7Xok7ykW4VK0tZI sW10EXMxcC/eA5g0IZiE5rTXgIra7d/E7j05gZqX3fI3JAyD2Rt4M5nMQLglXzcsogkHjaY2KfneI mVpm1CLD+AncMb/pSWmoepW2a43Do+0Rpw/H3zwRaL/rcxoXBSUhP5XkClLRjyou0tl2dytUx4oNc l5uQTinv/5TYh/36Tt3JVcvqq7Wh/ZNEoSl1tDMlttHgk446WffPmqhdpeHlZpxTbbONOXI8/qa66 T7BwTAkQNRamOUUejN29oOOVGryGiA5xatghBcIR5Z68R6LLHlybQqOcte4gkZkSYEvjQ8NjSFfj1 TQIsJDUmw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOXxs-0002Iw-Cl; Mon, 19 Nov 2018 01:03:00 +0000 Date: Sun, 18 Nov 2018 17:03:00 -0800 From: Matthew Wilcox To: Yafang Shao Cc: Andrew Morton , darrick.wong@oracle.com, Linux MM , LKML Subject: Re: [PATCH] mm/filemap.c: minor optimization in write_iter file operation Message-ID: <20181119010300.GD7861@bombadil.infradead.org> References: <1542542538-11938-1-git-send-email-laoar.shao@gmail.com> <20181118121318.GC7861@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 18, 2018 at 11:02:19PM +0800, Yafang Shao wrote: > On Sun, Nov 18, 2018 at 8:13 PM Matthew Wilcox wrote: > > Did you check the before/after code generation with this patch applied? > > Yes, I did. > My oompiler is gcc-4.8.5, a litte old, and with CONFIG_CC_OPTIMIZE_FOR_SIZE on. > > with gcc 8.2.0, I see no difference, indicating that the compiler already > > makes this optimisation. > > Could pls. try set CONFIG_CC_OPTIMIZE_FOR_SIZE on and then compare them again ? Actually it was already on: # CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y I happened to build it in my build-tiny output tree.