mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Lars Ellenberg" <lars.ellenberg@linbit.com>,
	"Satyam Sharma" <satyam.sharma@gmail.com>,
	"Kyle Moffett" <mrlinuxman@mac.com>,
	"Jens Axboe" <axboe@kernel.dk>, "Andrew Morton" <akpm@osdl.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [DRIVER SUBMISSION] DRBD wants to go mainline
Date: Wed, 25 Jul 2007 17:42:15 +0530	[thread overview]
Message-ID: <a781481a0707250512v29d41b1bh25bcd358e7381d38@mail.gmail.com> (raw)
In-Reply-To: <20070725094638.GA2444@mail.linbit.com>

On 7/25/07, Lars Ellenberg <lars.ellenberg@linbit.com> wrote:
> On Wed, Jul 25, 2007 at 04:41:53AM +0530, Satyam Sharma wrote:
> > [...]
> >
> > But where does the "send" come into the picture over here -- a send
> > won't block forever, so I don't foresee any issues whatsoever w.r.t.
> > kthreads conversion for that. [ BTW I hope you're *not* using any
> > signals-based interface for your kernel thread _at all_. Kthreads
> > disallow (ignore) all signals by default, as they should, and you really
> > shouldn't need to write any logic to handle or do-certain-things-on-seeing
> > a signal in a well designed kernel thread. ]
> >
> > >and the sending
> > >latency is crucial to performance, while the recv
> > >will not timeout for the next few seconds.
> >
> > Again, I don't see what sending latency has to do with a kernel_thread
> > to kthread conversion. Or with signals, for that matter. Anyway, as
> > Kyle Moffett mentioned elsewhere, you could probably look at other
> > examples (say cifs_demultiplexer_thread() in fs/cifs/connect.c).
>
> the basic problem, and what we use signals for, is:
>
> it is waiting in recv, waiting for the peer to say something.
> but I want it to stop recv, and go send something "right now".

That's ... weird. Most (all?) communication between any two parties
would follow a protocol where someone recv's stuff, does something
with it, and sends it back ... what would you send "right now" if you
didn't receive anything?

> I don't want to have two threads for that.

I really think you should -- you clearly should. From the above, it does
appear that you're mixing in multiple kinds of stuff into a single thread,
and thus mucking up the entire design (and implementation).

> yes we have timeo in place, anyways: we need to detect a failed peer
> node in time. we even aim for "sub-second failover" sometimes (which is
> not exactly feasible; but failover times of 15 seconds and less are
> requirement for useable HA-iSCSI deployments).
> but that does not cut it, timeo is seconds.
> you don't want seconds latency for IO operations.

Ok, that's a reasonable goal.

> so I signal it, it breaks out of recv, then sends, and goes back to recv.
>
> in-kernel epoll would probably solve this.
> I don't know how to do that properly, though.

Hmm, probably I don't understand what you're doing, how you're doing etc.
Will wait for the design & implementation docs.

Thanks,
Satyam

  reply	other threads:[~2007-07-25 12:12 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-21 20:38 Lars Ellenberg
2007-07-21 21:17 ` Jan Engelhardt
2007-07-21 22:43   ` Lars Ellenberg
2007-07-22  9:06     ` Jan Engelhardt
2007-07-22 14:03       ` Lars Ellenberg
2007-07-27 18:46     ` Pavel Machek
2007-07-30 19:35       ` Lars Ellenberg
2007-07-30 19:41         ` Jan Engelhardt
2007-07-21 21:34 ` Jesper Juhl
2007-07-21 23:50 ` Andi Kleen
2007-07-22  5:52   ` Jens Axboe
2007-07-22 13:58     ` Lars Ellenberg
2007-07-22 14:49       ` Sam Ravnborg
2007-07-22 14:56       ` Andi Kleen
2007-07-22 15:31       ` Satyam Sharma
2007-07-22 15:50         ` Satyam Sharma
2007-07-22 16:13         ` Stefan Richter
2007-07-22  6:09   ` Lars Ellenberg
2007-07-22  8:52     ` Sam Ravnborg
2007-07-22  9:05       ` Pekka Enberg
2007-07-22  9:00     ` Pekka Enberg
2007-07-23  1:32 ` Kyle Moffett
2007-07-23  8:49   ` Christoph Hellwig
2007-07-23  9:00     ` Sam Ravnborg
2007-07-23  9:01       ` Christoph Hellwig
2007-07-23  9:19         ` Sam Ravnborg
2007-07-23 11:08           ` Lars Ellenberg
2007-07-23 13:32   ` Lars Ellenberg
2007-07-23 13:37     ` Jens Axboe
2007-07-23 21:13       ` Lars Ellenberg
2007-07-23 13:40     ` Satyam Sharma
2007-07-23 21:19       ` Lars Ellenberg
2007-07-24  7:36         ` Jens Axboe
2007-07-24 23:11         ` Satyam Sharma
2007-07-25  9:46           ` Lars Ellenberg
2007-07-25 12:12             ` Satyam Sharma [this message]
2007-07-26  2:03               ` david
2007-07-26  3:43                 ` Kyle Moffett
2007-07-26  9:17                   ` Evgeniy Polyakov
2007-07-24  0:48     ` Kyle Moffett
2007-07-23 20:59 ` Jesper Juhl
2007-07-22  9:54 Tomasz Chmielewski

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=a781481a0707250512v29d41b1bh25bcd358e7381d38@mail.gmail.com \
    --to=satyam.sharma@gmail.com \
    --cc=akpm@osdl.org \
    --cc=axboe@kernel.dk \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrlinuxman@mac.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®