Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751403AbeAPP4c (ORCPT + 1 other); Tue, 16 Jan 2018 10:56:32 -0500 Received: from mail-io0-f176.google.com ([209.85.223.176]:45503 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328AbeAPP42 (ORCPT ); Tue, 16 Jan 2018 10:56:28 -0500 X-Google-Smtp-Source: ACJfBou56J4+0oW1W0oVFBtS0Mu+m80pDUyPr6wFzlk8iTDWS5oi1vrh2Gq7YNloEJBSELdPEey17Q== Subject: Re: [PATCH] [RESEND] blkcg: simplify statistic accumulation code To: Arnd Bergmann Cc: Tejun Heo , Shaohua Li , linux-kernel@vger.kernel.org References: <20180116150154.2538110-1-arnd@arndb.de> From: Jens Axboe Message-ID: <97f406a5-ca2c-43a4-d7a1-e6cf40b7a917@kernel.dk> Date: Tue, 16 Jan 2018 08:56:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 MIME-Version: 1.0 In-Reply-To: <20180116150154.2538110-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 1/16/18 8:01 AM, Arnd Bergmann wrote: > Some older compilers (gcc-4.4 through 4.6 in particular) struggle > with the way that blkg_rwstat_read() returns a structure, leading > to excessive stack usage and rather inefficient code: > > block/blk-cgroup.c: In function 'blkg_destroy': > block/blk-cgroup.c:354:1: error: the frame size of 1296 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > block/cfq-iosched.c: In function 'cfqg_stats_add_aux': > block/cfq-iosched.c:753:1: error: the frame size of 1928 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > block/bfq-cgroup.c: In function 'bfqg_stats_add_aux': > block/bfq-cgroup.c:299:1: error: the frame size of 1928 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] > > I also notice that there is no point in using atomic accesses > for the local variables, so storing the temporaries in simple 'u64' > variables not only avoids the stack usage on older compilers but > also improves the object code on modern versions. Added for 4.16, thanks Arnd. -- Jens Axboe