From: John Stultz <john.stultz@linaro.org>
To: Colin Cross <ccross@android.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Android Kernel Team <kernel-team@android.com>,
Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [RFC][PATCH 3/3] staging: ion: Avoid using rt_mutexes directly.
Date: Mon, 16 Dec 2013 17:22:46 -0800 [thread overview]
Message-ID: <52AFA766.9070804@linaro.org> (raw)
In-Reply-To: <CAMbhsRQOWKWBjQJWndr57Cz_Xf0EeU8jNMJOyiOEBHFRf=Tt=Q@mail.gmail.com>
On 12/16/2013 04:17 PM, Colin Cross wrote:
> The lock is only used to protect the heap's free_list and
> free_list_size members, and is not held for any long or sleeping
> operations. Converting to a spinlock should prevent priority
> inversion without using the rt_mutex. I'd also rename it to free_lock
> to so it doesn't get used as a general heap lock.
Hrm.. So at least a trivial conversion to use spinlocks doesn't quite
work out, as we call ion_buffer_destroy() in ion_heap_freelist_drain()
while holding the lock, and that calls all sorts of not safe stuff.
I'll spend some more time looking at it later tonight, but let me know
if you have an approach for this case in mind.
thanks
-john
next prev parent reply other threads:[~2013-12-17 1:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 21:32 [RFC][PATCH 0/3] ION fixups for staging-next John Stultz
2013-12-16 21:32 ` [RFC][PATCH 1/3] staging: ion: Add HAVE_MEMBLOCK config dependency John Stultz
2013-12-16 21:32 ` [RFC][PATCH 2/3] staging: ion: Fix possible null pointer dereference John Stultz
2013-12-16 21:40 ` Greg KH
2013-12-17 0:26 ` Colin Cross
2013-12-17 0:37 ` John Stultz
2013-12-16 21:32 ` [RFC][PATCH 3/3] staging: ion: Avoid using rt_mutexes directly John Stultz
2013-12-17 0:17 ` Colin Cross
2013-12-17 1:22 ` John Stultz [this message]
2013-12-17 1:34 ` Colin Cross
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=52AFA766.9070804@linaro.org \
--to=john.stultz@linaro.org \
--cc=ccross@android.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox