mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erlend Aasland <erlend-a@ux.his.no>
To: Matt Mackall <mpm@selenic.com>
Cc: Steve French <sfrench@us.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Samba Technical Mailing List <samba-technical@samba.org>,
	James Morris <jmorris@intercode.com.au>
Subject: Re: [PATCH CIFS] use CryptoAPI MD4/MD5
Date: Thu, 2 Oct 2003 01:52:28 +0200	[thread overview]
Message-ID: <20031001235228.GD18028@badne3.ux.his.no> (raw)
In-Reply-To: <20031001234219.GM1897@waste.org>

Hi Matt,

Thanks for your replies and suggestions.

On 10/01/03 18:42, Matt Mackall wrote:
> On Thu, Oct 02, 2003 at 01:26:50AM +0200, Erlend Aasland wrote:
> > On 10/01/03 14:55, Matt Mackall wrote:
> > > On Wed, Oct 01, 2003 at 03:30:39PM +0200, Erlend Aasland wrote:
> > > >  static int cifs_calculate_signature(const struct smb_hdr * cifs_pdu, const char * key, char * signature)
> > > [...]
> > > Eek. How often does this get called?
> > It is (normally) called twice in SendReceive(). SendReceive() is called
> > very often in cifs. After a quick look at cifs, it seems that most of
> > these calls are protected with a per connection-lock (correct me if I'm
> > wrong). But since two connections can call SendReceive() at the same
> > time, we have to protect the tfm with locks. Correct?
> Correct. But this lock is going to be a huge bottleneck.
Yes, I should have thought about this in the first place :-)

> > Would a better solution be to allocate one tfm per connection, thus
> > no need to protect the tfm with a dedicated lock, right?
> Per connection sounds like a much better answer, assuming you can
> guarantee that SendReceive() never gets called simultaneously on the
> same connection.
I will do this and try to trace each SendReceive() call, verifying
that this is a safe solution.

Regards
	Erlend Aasland

  reply	other threads:[~2003-10-01 23:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-02 20:30 [RFC][PATCH] 2nd try to convert cifs to use CryptoAPI Erlend Aasland
2003-10-01 13:30 ` [PATCH CIFS] use CryptoAPI MD4/MD5 Erlend Aasland
2003-10-01 19:55   ` Matt Mackall
2003-10-01 23:26     ` Erlend Aasland
2003-10-01 23:42       ` Matt Mackall
2003-10-01 23:52         ` Erlend Aasland [this message]
     [not found] <OF9C1504BB.5FB00D5A-ON87256DB3.0015672E-86256DB3.001798AE@us.ibm.com>
2003-10-02 11:37 ` Erlend Aasland
2003-10-04 18:00   ` dean gaudet
2003-10-04 18:24     ` Matt Mackall
2003-10-04 18:51       ` dean gaudet
2003-10-04 20:08         ` Francois Romieu
2003-10-05  0:08         ` Matt Mackall
2003-10-05 12:29         ` Erlend Aasland

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=20031001235228.GD18028@badne3.ux.his.no \
    --to=erlend-a@ux.his.no \
    --cc=jmorris@intercode.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=samba-technical@samba.org \
    --cc=sfrench@us.ibm.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®