mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jens Axboe <axboe@fb.com>, Tahsin Erdogan <tahsin@google.com>,
	Bart Van Assche <bart.vanassche@sandisk.com>,
	Shaohua Li <shli@fb.com>, Nikolay Borisov <nborisov@suse.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blkcg: simplify statistic accumulation code
Date: Mon, 18 Sep 2017 20:26:55 -0700	[thread overview]
Message-ID: <20170919032655.GO378890@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20170915193647.1102621-1-arnd@arndb.de>

On Fri, Sep 15, 2017 at 09:36:21PM +0200, 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.
> 
> Fixes: e6269c445467 ("blkcg: add blkg_[rw]stat->aux_cnt and replace cfq_group->dead_stats with it")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

      reply	other threads:[~2017-09-19  3:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 19:36 Arnd Bergmann
2017-09-19  3:26 ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170919032655.GO378890@devbig577.frc2.facebook.com \
    --to=tj@kernel.org \
    --cc=arnd@arndb.de \
    --cc=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=shli@fb.com \
    --cc=tahsin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome