From: "aluno3@poczta.onet.pl" <aluno3@poczta.onet.pl>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: Calltrace in dm-snapshot in 2.6.27 kernel
Date: Thu, 23 Oct 2008 13:30:04 +0200 [thread overview]
Message-ID: <4900603C.2090508@poczta.onet.pl> (raw)
In-Reply-To: <Pine.LNX.4.64.0810221238030.3985@hs20-bc2-1.build.redhat.com>
I used dm-snapshot-fix-primary-pe-race.patch and last patch related with
pending_exception.After the same test and workload everything work
correctly so far.Is it final patch?
best and thanks
Mikulas Patocka wrote:
> Oh, sorry for this "struct struct" in the patch in free_pending_exception,
> replace it just with one "struct". I forgot to refresh the patch before
> sending it.
>
> Mikulas
>
> On Wed, 22 Oct 2008, Mikulas Patocka wrote:
>
>
>> On Wed, 22 Oct 2008, aluno3@poczta.onet.pl wrote:
>>
>>
>>> Hi
>>>
>>> I used your patch and I ran test the same workload. After a few hours
>>> test, everything is OK. Is it possible? Test is still running.When I get
>>> something wrong from kernel I write to You again.
>>>
>> Hi
>>
>> That's good that it works. So try this. Keep the first patch (it is this
>> one ---
>> http://people.redhat.com/mpatocka/patches/kernel/2.6.27/dm-snapshot-fix-primary-pe-race.patch
>> --- I think Milan already sent it to you and you have it applied). Undo
>> the second patch (that one that hides deallocation with /* */ ). And apply
>> this. Run the same test.
>>
>> Mikulas
>>
>> ---
>> drivers/md/dm-snap.c | 10 +++++++++-
>> drivers/md/dm-snap.h | 2 ++
>> 2 files changed, 11 insertions(+), 1 deletion(-)
>>
>> Index: linux-2.6.27-clean/drivers/md/dm-snap.c
>> ===================================================================
>> --- linux-2.6.27-clean.orig/drivers/md/dm-snap.c 2008-10-22 15:41:24.000000000 +0200
>> +++ linux-2.6.27-clean/drivers/md/dm-snap.c 2008-10-22 15:51:33.000000000 +0200
>> @@ -368,6 +368,7 @@ static struct dm_snap_pending_exception
>> struct dm_snap_pending_exception *pe = mempool_alloc(s->pending_pool,
>> GFP_NOIO);
>>
>> + atomic_inc(&s->n_pending_exceptions);
>> pe->snap = s;
>>
>> return pe;
>> @@ -375,7 +376,10 @@ static struct dm_snap_pending_exception
>>
>> static void free_pending_exception(struct dm_snap_pending_exception *pe)
>> {
>> - mempool_free(pe, pe->snap->pending_pool);
>> + struct struct dm_snapshot *s = pe->snap;
>> + mempool_free(pe, s->pending_pool);
>> + smp_mb__before_atomic_dec();
>> + atomic_dec(&s->n_pending_exceptions);
>> }
>>
>> static void insert_completed_exception(struct dm_snapshot *s,
>> @@ -601,6 +605,7 @@ static int snapshot_ctr(struct dm_target
>> s->valid = 1;
>> s->active = 0;
>> s->last_percent = 0;
>> + atomic_set(&s->n_pending_exceptions, 0);
>> init_rwsem(&s->lock);
>> spin_lock_init(&s->pe_lock);
>> s->ti = ti;
>> @@ -727,6 +732,9 @@ static void snapshot_dtr(struct dm_targe
>> /* After this returns there can be no new kcopyd jobs. */
>> unregister_snapshot(s);
>>
>> + while (atomic_read(&s->n_pending_exceptions))
>> + yield();
>> +
>> #ifdef CONFIG_DM_DEBUG
>> for (i = 0; i < DM_TRACKED_CHUNK_HASH_SIZE; i++)
>> BUG_ON(!hlist_empty(&s->tracked_chunk_hash[i]));
>> Index: linux-2.6.27-clean/drivers/md/dm-snap.h
>> ===================================================================
>> --- linux-2.6.27-clean.orig/drivers/md/dm-snap.h 2008-10-22 15:45:08.000000000 +0200
>> +++ linux-2.6.27-clean/drivers/md/dm-snap.h 2008-10-22 15:46:49.000000000 +0200
>> @@ -163,6 +163,8 @@ struct dm_snapshot {
>>
>> mempool_t *pending_pool;
>>
>> + atomic_t n_pending_exceptions;
>> +
>> struct exception_table pending;
>> struct exception_table complete;
>>
>>
>> --
>> dm-devel mailing list
>> dm-devel@redhat.com
>> https://www.redhat.com/mailman/listinfo/dm-devel
>>
>>
>
>
next prev parent reply other threads:[~2008-10-23 11:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-20 6:23 Calltrace in dm-snapshot in 2.6.27 kernel aluno3
2008-10-20 8:43 ` Milan Broz
2008-10-21 6:39 ` aluno3
2008-10-21 13:55 ` Mikulas Patocka
[not found] ` <48FDFF53.5080007@poczta.onet.pl>
2008-10-21 17:22 ` Mikulas Patocka
2008-10-21 18:42 ` aluno3
2008-10-21 21:43 ` Mikulas Patocka
2008-10-22 13:37 ` aluno3
2008-10-22 15:45 ` Mikulas Patocka
2008-10-22 16:39 ` Mikulas Patocka
2008-10-23 11:30 ` aluno3 [this message]
2008-10-23 13:40 ` Mikulas Patocka
2008-11-19 8:31 ` aluno3
2008-11-24 10:52 ` Mikulas Patocka
2008-11-26 7:38 ` aluno3
2008-11-28 7:28 ` aluno3
2008-12-02 2:10 ` Mikulas Patocka
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=4900603C.2090508@poczta.onet.pl \
--to=aluno3@poczta.onet.pl \
--cc=dm-devel@redhat.com \
--cc=mpatocka@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.