[DRBD-user] DRBD (0.6) slows down the application. After someresearch

Hans Holm hans.holm at siatm.com
Mon Sep 12 15:22:58 CEST 2005

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello Lars,

I moved the patch to before while(1) in asender thread function.
This is working as fine as when I patched inside drbd_recv(), which is
removed!

So the signal DRBD_SIG is always blocked when the asender thread is
re-started
after a Full sync!???!

Can I keep the patch before the while(1) then?

//PATCH in drbd_receive.c line 1523 (drbd-0.6.12)
 +  if (sigismember(&current->blocked, DRBD_SIG)){
 +         spin_lock_irqsave(&current->SIGMASK_LOCK, flags);
 +         sigfillset(&current->blocked);
 +         sigdelset(&current->blocked,DRBD_SIG);
 +         RECALC_SIGPENDING(current);
 +         spin_unlock_irqrestore(&current->SIGMASK_LOCK, flags);
 +         printk(KERN_ERR DEVICE_NAME "ASENDER:  SIGNAL DRBD_SIG IS NOW
UN-BLOCKED\n");
 +  }
    while(1)

Thanks for the answers and advice, Hans

-----Original Message-----
From: drbd-user-bounces at lists.linbit.com
[mailto:drbd-user-bounces at lists.linbit.com]On Behalf Of Lars Ellenberg
Sent: den 12 september 2005 13:24
To: drbd-user at lists.linbit.com
Subject: Re: [DRBD-user] DRBD (0.6) slows down the application. After
someresearch


/ 2005-09-12 12:47:31 +0200
\ Hans Holm:
>
> Hello again,
>
> After spending some days with debugging my drbd-0.6.12 problem I found
this!
>
> At the secondary side in the asender thread when reaching sock_recvmsg()
> call the signal DRBD_SIG is blocked when the secondary side is in the
> SynchingQuick state and afterwards in next Connected state.
>
> Who is blocking it and why?

nobody should. no reason.  (as far as I can remember)

> So the primary always times out waiting for WriteAck and then sends Ping,
> avoiding a completely deadlock.
> The WriteAck is only send after the received Ping, two seconds too late,
> because the secondary asender hangs in  sock_recvmsg() with the DRBD_SIG
> blocked.
>
> I made the following patch that seems to work fine.
> But I am really a newbie kernel programmer so I am afraid that I am
perhaps
> making
> a new bug or something else stupid?
>
> Please could someone just look at the patch for a moment without taking
any
> responsibility for it!?!
>
> The patch code I used is the same code as you use around sock_sendmsg()
call
> in drbd_main.c.

rather try to double check (assert) the sigset,
and allow the signal just befor the while(1) {
in drbd_asender(), and maybe again just before the drbd_recv
within the loop.

it would be interessting which of those two asserts would trigger.

if both do not trigger, but your current one still does,
that would be interessting, too.

thanks for feedback!

	Lars

--
: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
__
please use the "List-Reply" function of your email client.
_______________________________________________
drbd-user mailing list
drbd-user at lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user




More information about the drbd-user mailing list