From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Steve French" <smfrench@gmail.com>
Cc: "Jeff Layton" <jlayton@redhat.com>,
"Christoph Hellwig" <hch@infradead.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] CIFS: make cifsd (more)
Date: Sat, 30 Jun 2007 20:08:01 +0530 [thread overview]
Message-ID: <a781481a0706300738g2e92d959qeb50bebdf34db13f@mail.gmail.com> (raw)
In-Reply-To: <524f69650706300632p1f4fb3e0l23bd017672b77baf@mail.gmail.com>
[ Trimmed Cc: list ]
On 6/30/07, Steve French <smfrench@gmail.com> wrote:
> The reason that cifs switched from wait_for_completion to the kthread
> call to cifs_demultiplex_thread in the first place is because without
> use of kthread it won't work with a linux-vserver. See the thread:
>
> http://marc.info/?l=linux-cifs-client&m=117552761703381&w=2
>
> If we take out the kthread call, we break those guys.
>
> I agree that using sk_callbacks is worth looking into - I only found
> ocfs2 and SunRPC (NFS) though that used it. Is there a better
> example though? The NFS socket handling code is huge
> (net/sunrpc/xprtsck.c) - something seems wrong when replacing a few
> lines of code with a new 1675 line file. There must be a better
> example of doing what you suggest...
You're correct. "Right" / "elegant" solutions are rarely (if ever?) complex
and involved. Simplicity _is_ good. I see no point in converting 5 good
lines of maintainable, readable, solid code with 1000 lines of kludge :-)
just to work-around this kthreads limitation. But then, of course, the call
is yours.
> I am tempted to drop the socket timeout (which cifs sets to 7 seconds)
> to a smaller number and not use signals at all rather than add that
> much complexity
Timeout too low => CPU wastage => power wastage. [ Think laptop
batteries, with say 5 cifsd kthreads waking up once every second ... ]
Timeout too high => umount(2) hangs, annoys user, user takes
drastic actions ... so think of some good "magic number" :-)
I don't quite think of all these suggestions as solutions at all -- they
are workarounds at best, IMHO (for kthread's limitation in dealing with
kernel threads that want to block -- I still don't see any fundamental
reasoning / logic behind why kthreads should be banned from doing
blocking recv's -- if there is, please let me know too).
Don't have much else to say than what I already have on the two
threads discussing this.
Satyam
prev parent reply other threads:[~2007-06-30 14:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <524f69650706251525g7b17ea02o5fb3e637615fe542@mail.gmail.com>
2007-06-30 8:42 ` [PATCH] CIFS: make cifsd (more) Christoph Hellwig
2007-06-30 11:15 ` Jeff Layton
2007-06-30 13:32 ` Steve French
2007-06-30 14:38 ` Satyam Sharma [this message]
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=a781481a0706300738g2e92d959qeb50bebdf34db13f@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=hch@infradead.org \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=smfrench@gmail.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;
as well as URLs for NNTP newsgroup(s).