Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752201AbcC0UoR (ORCPT ); Sun, 27 Mar 2016 16:44:17 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37989 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbcC0UoQ (ORCPT ); Sun, 27 Mar 2016 16:44:16 -0400 Date: Sun, 27 Mar 2016 23:44:13 +0300 From: "Kirill A. Shutemov" To: George Spelvin Cc: ebiggers3@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: Bloat caused by unnecessary calls to compound_head()? Message-ID: <20160327204413.GB9638@node.shutemov.name> References: <20160327203304.9695.qmail@ns.horizon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160327203304.9695.qmail@ns.horizon.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 656 Lines: 18 On Sun, Mar 27, 2016 at 04:33:04PM -0400, George Spelvin wrote: > Could you just mark compound_head __pure? That would tell the compiler > that it's safe to re-use the return value as long as there is no memory > mutation in between. > Hm. It has some positive impact, but it's not dramatic. For instance, mm/swap.o results: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-43 (-43) function old new delta __page_cache_release 319 298 -21 release_pages 722 700 -22 mark_page_accessed() problem was not fixed by that. -- Kirill A. Shutemov