From: Alexandre Oliva <oliva@gnu.org>
To: Josef Bacik <jbacik@fusionio.com>
Cc: "linux-btrfs\@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: collapse concurrent forced allocations
Date: Sat, 23 Feb 2013 11:18:29 -0300 [thread overview]
Message-ID: <orvc9jp0zu.fsf@livre.home> (raw)
In-Reply-To: <20130222155403.GC2062@localhost.localdomain> (Josef Bacik's message of "Fri, 22 Feb 2013 10:54:03 -0500")
On Feb 22, 2013, Josef Bacik <jbacik@fusionio.com> wrote:
> So I understand what you are getting at, but I think you are doing it wrong. If
> we're calling with CHUNK_ALLOC_FORCE, but somebody has already started to
> allocate with CHUNK_ALLOC_NO_FORCE, we'll reset the space_info->force_alloc to
> our original caller's CHUNK_ALLOC_FORCE.
But that's ok, do_chunk_alloc will set space_info->force_alloc to
CHUNK_ALLOC_NO_FORCE at the end, when it succeeds allocating, and then
anyone else waiting on the mutex to try to allocate will load the
NO_FORCE from space_info.
> So we only really care about making sure a chunk is actually
> allocated, instead of doing this flag shuffling we should just do
> if (space_info->chunk_alloc) {
> spin_unlock(&space_info->lock);
> wait_event(!space_info->chunk_alloc);
> return 0;
> }
Sorry, I don't follow.
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer
next prev parent reply other threads:[~2013-02-23 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 21:15 clear chunk_alloc flag on retryable failure Alexandre Oliva
2013-02-22 1:15 ` collapse concurrent forced allocations (was: Re: clear chunk_alloc flag on retryable failure) Alexandre Oliva
2013-02-22 15:54 ` Josef Bacik
2013-02-23 14:18 ` Alexandre Oliva [this message]
2013-03-04 0:54 ` collapse concurrent forced allocations Alexandre Oliva
2013-02-22 15:54 ` clear chunk_alloc flag on retryable failure Josef Bacik
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=orvc9jp0zu.fsf@livre.home \
--to=oliva@gnu.org \
--cc=jbacik@fusionio.com \
--cc=linux-btrfs@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.