mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kent Overstreet <koverstreet@google.com>
Cc: linux-kernel@vger.kernel.org, linux-bcache@vger.kernel.org,
	tj@kernel.org, axboe@kernel.dk,
	James.Bottomley@hansenpartnership.com, snitzer@redhat.com
Subject: Re: Bcache v. whatever
Date: Thu, 25 Apr 2013 16:17:04 -0700	[thread overview]
Message-ID: <20130425161704.3f0fc3b6af55cf75acbc9d9e@linux-foundation.org> (raw)
In-Reply-To: <20130114223202.GV26407@google.com>

On Mon, 14 Jan 2013 14:32:02 -0800 Kent Overstreet <koverstreet@google.com> wrote:

> Bcache: a block layer SSD cache

sparc64 gcc-3.4.5:

drivers/md/bcache/btree.c: In function `bch_btree_read':
drivers/md/bcache/btree.c:266: error: invalid operands to binary +
drivers/md/bcache/btree.c: In function `__btree_write':
drivers/md/bcache/btree.c:379: error: invalid operands to binary +
drivers/md/bcache/btree.c: In function `btree_node_free':
drivers/md/bcache/btree.c:980: error: invalid operands to binary +
drivers/md/bcache/btree.c: In function `btree_insert_key':
drivers/md/bcache/btree.c:1857: error: invalid operands to binary +
drivers/md/bcache/btree.c:1857: error: invalid operands to binary +
drivers/md/bcache/btree.c:1859: error: invalid operands to binary +
drivers/md/bcache/btree.c:1859: error: invalid operands to binary +
drivers/md/bcache/btree.c:1864: error: invalid operands to binary +
drivers/md/bcache/btree.c:1864: error: invalid operands to binary +
drivers/md/bcache/btree.c: In function `btree_split':
drivers/md/bcache/btree.c:1934: error: invalid operands to binary +
drivers/md/bcache/btree.c: In function `bch_btree_set_root':
drivers/md/bcache/btree.c:2159: error: invalid operands to binary +
drivers/md/bcache/btree.c: In function `bch_btree_search_recurse':
drivers/md/bcache/btree.c:2262: error: invalid operands to binary +
drivers/md/bcache/btree.c: In function `bch_btree_refill_keybuf':
drivers/md/bcache/btree.c:2330: error: invalid operands to binary +

due to

#define pbtree(b)       (&bch_pbtree(b).s[0])

I don't know why this is happening (presumably a gcc glitch), but
returning an 80-byte struct by value from bch_pkey() and bch_pbtree()
is just gruesome.  The compiler has to allocate the space on the caller
stack, pass a hidden pointer into the callee and the callee copies its
return value into that caller stack slot.  It's slow and consumes stack.

Something different, please.



  parent reply	other threads:[~2013-04-25 23:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 22:32 Kent Overstreet
2013-01-15  1:49 ` Greg KH
2013-01-15 21:18   ` Kent Overstreet
2013-01-15 22:50     ` Greg KH
2013-01-15  9:20 ` James Bottomley
2013-01-15 20:59   ` Kent Overstreet
2013-01-15 23:15     ` James Bottomley
2013-01-15 23:33       ` Kent Overstreet
2013-01-16  1:29         ` Alasdair G Kergon
2013-01-17 23:43           ` Mike Snitzer
2013-01-15 21:25 ` [PATCH 1/4] Revert "rw_semaphore: remove up/down_read_non_owner" Kent Overstreet
2013-01-15 21:25 ` [PATCH 2/4] Export get_random_int() Kent Overstreet
2013-01-15 21:25 ` [PATCH 3/4] Export blk_fill_rwbs() Kent Overstreet
2013-02-01  3:48   ` Steven Rostedt
2013-02-01  3:57     ` Li Zefan
2013-02-01  4:06       ` Steven Rostedt
2013-01-15 21:25 ` [PATCH 4/4] Export __lockdep_no_validate__ Kent Overstreet
2013-04-25 23:17 ` Andrew Morton [this message]
2013-04-26 19:46   ` Bcache v. whatever Kent Overstreet
2013-04-26 20:24     ` Andrew Morton
2013-04-26 20:54       ` Kent Overstreet

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=20130425161704.3f0fc3b6af55cf75acbc9d9e@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=axboe@kernel.dk \
    --cc=koverstreet@google.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snitzer@redhat.com \
    --cc=tj@kernel.org \
    /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