From: Ryo Tsuruta <ryov@valinux.co.jp>
To: agk@redhat.com
Cc: dm-devel@redhat.com
Subject: Re: [PATCH 1/2] dm-ioband: I/O bandwidth controller v1.10.0: Source code and patch
Date: Wed, 21 Jan 2009 22:03:56 +0900 (JST) [thread overview]
Message-ID: <20090121.220356.39155811.ryov@valinux.co.jp> (raw)
In-Reply-To: <20090120145208.GE9859@agk.fab.redhat.com>
Hi Alasdair,
Thank you for reviewing and giving me suggestions.
> On Tue, Jan 20, 2009 at 02:11:14PM +0900, Ryo Tsuruta wrote:
> > This patch is the dm-ioband version 1.10.0 release.
>
> drivers/md/dm-ioband-ctl.c:194:2: warning: context problem in 'suspend_ioband_device': '_spin_unlock_irqrestore' expected different c
> ontext
> drivers/md/dm-ioband-ctl.c:194:2: context 'lock': wanted >= 1, got 0
> drivers/md/dm-ioband-ctl.c:608:3: warning: context problem in 'prevent_burst_bios': '_spin_unlock_irq' expected different context
> drivers/md/dm-ioband-ctl.c:608:3: context 'lock': wanted >= 1, got 0
>
>
> Last time we had something like that, it was straightforward to restructure the
> functions to avoid it - see if you can manage that here too.
I'm trying to suppress these warnings, but the latest sparse command
(2009-01-21) doesn't seem to interpret __acquires() and __releases()
macros properly.
I wrote the following sample code and tested with sparse-0.4.1 and
sparse-2009-01-21.
static void foo(struct ioband_device *dp, unsigned long flags)
{
spin_unlock_irqrestore(&dp->g_lock, flags);
}
The both sparse commands issued warnings as I expected.
sparse-0.4.1
CHECK /home/ryov/work/dm-ioband/dm-ioband/src/dm-ioband-ctl.c
/home/ryov/work/dm-ioband/dm-ioband/src/dm-ioband-ctl.c:171:13:
warning: context imbalance in 'foo' - unexpected unlock
sparse-2009-01-21
/home/ryov/work/dm-ioband/dm-ioband/src/dm-ioband-ctl.c:173:2:
warning: context problem in 'foo': '_spin_unlock_irqrestore'
expected different context
/home/ryov/work/dm-ioband/dm-ioband/src/dm-ioband-ctl.c:173:2:
context 'lock': wanted >= 1, got 0
Next, I added a __releases() macro and tested again.
static void foo(struct ioband_device *dp, unsigned long flags)
__releases(dp->g_lock)
{
spin_unlock_irqrestore(&dp->g_lock, flags);
}
Only sparse-2009-01-21 still issued the warning.
CHECK /home/ryov/work/dm-ioband/dm-ioband/src/dm-ioband-ctl.c
/home/ryov/work/dm-ioband/dm-ioband/src/dm-ioband-ctl.c:174:2:
warning: context problem in 'foo': '_spin_unlock_irqrestore'
expected different context
/home/ryov/work/dm-ioband/dm-ioband/src/dm-ioband-ctl.c:174:2:
context 'lock': wanted >= 1, got 0
Could you tell me which sparse version are you using?
Thanks,
Ryo Tsuruta
next prev parent reply other threads:[~2009-01-21 13:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-20 5:10 [PATCH 0/2] dm-ioband: I/O bandwidth controller v1.10.0: Introduction Ryo Tsuruta
2009-01-20 5:11 ` [PATCH 1/2] dm-ioband: I/O bandwidth controller v1.10.0: Source code and patch Ryo Tsuruta
2009-01-20 5:12 ` [PATCH 2/2] dm-ioband: I/O bandwidth controller v1.10.0: Document Ryo Tsuruta
2009-01-20 14:52 ` [PATCH 1/2] dm-ioband: I/O bandwidth controller v1.10.0: Source code and patch Alasdair G Kergon
2009-01-21 13:03 ` Ryo Tsuruta [this message]
2009-01-21 17:18 ` Alasdair G Kergon
2009-01-22 12:05 ` Ryo Tsuruta
2009-02-04 5:07 ` Ryo Tsuruta
2009-01-20 15:19 ` Alasdair G Kergon
2009-01-20 15:53 ` Alasdair G Kergon
[not found] ` <20090120155334.GH9859-swAlYijrCMMf7BdofF/totBPR1lH4CV8@public.gmane.org>
2009-01-22 16:12 ` [dm-devel] " Vivek Goyal
2009-01-22 16:12 ` Vivek Goyal
[not found] ` <20090122161218.GA28795-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-23 10:14 ` Ryo Tsuruta
2009-01-23 10:14 ` Ryo Tsuruta
[not found] ` <20090123.191404.39168431.ryov-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2009-01-26 16:29 ` Vivek Goyal
2009-01-26 16:29 ` Vivek Goyal
[not found] ` <20090126162951.GI31802-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-01-29 3:36 ` 2-Level IO scheduling (Re: [dm-devel] [PATCH 1/2] dm-ioband: I/O bandwidth controller v1.10.0: Source code and patch) Ryo Tsuruta
2009-01-29 3:39 ` Hierarchical grouping facility for IO controller " Ryo Tsuruta
2009-01-29 3:41 ` Implementation of dm-ioband as a dm-driver " Ryo Tsuruta
2009-01-29 3:36 ` 2-Level IO scheduling " Ryo Tsuruta
2009-01-29 3:39 ` Hierarchical grouping facility for IO controller " Ryo Tsuruta
2009-01-29 3:41 ` Implementation of dm-ioband as a dm-driver " Ryo Tsuruta
2009-01-20 15:04 ` [PATCH 0/2] dm-ioband: I/O bandwidth controller v1.10.0: Introduction Alasdair G Kergon
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=20090121.220356.39155811.ryov@valinux.co.jp \
--to=ryov@valinux.co.jp \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.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 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.