From: Paul Fulghum <paulkf@microgate.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Greg KH <greg@kroah.com>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] n_hdlc fix read and write locking
Date: Mon, 25 Oct 2010 15:19:52 -0600 [thread overview]
Message-ID: <4CC5F478.40109@microgate.com> (raw)
In-Reply-To: <20101025130502.77685ac1.akpm@linux-foundation.org>
On 10/25/2010 2:05 PM, Andrew Morton wrote:
> And a signed-off-by:, please.
OK
> It's not a bug afaict, but beware that a copy_to_user() will
> unconditionally flip this task back into TASK_RUNNING state if it takes
> a pagefault. This means that the below schedule() will fall straight
> through. It looks like the code will handle this correctly? If so,
> it's just a little suboptimal.
copy_to_user is only called when data is available to
complete the read and break terminates the loop without
calling schedule().
>> + set_current_state(TASK_RUNNING);
>
> We normally use __set_current_state() here - it saves a few cycles.
I'll change it to __set_current_state() and resubmit.
--
Paul Fulghum
MicroGate Systems, Ltd.
=Customer Driven, by Design=
(800)444-1982
(512)345-7791 (Direct)
(512)343-9046 (Fax)
Central Time Zone (GMT -6h)
www.microgate.com
next prev parent reply other threads:[~2010-10-25 20:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 18:22 [PATCH] n_hdlc fix read and write locking Paul Fulghum
2010-10-25 20:05 ` Andrew Morton
2010-10-25 20:29 ` Paul Fulghum
2010-10-25 21:19 ` Paul Fulghum [this message]
2010-10-25 20:31 ` Arnd Bergmann
2010-10-25 23:18 ` Paul Fulghum
2010-10-26 10:40 ` Arnd Bergmann
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=4CC5F478.40109@microgate.com \
--to=paulkf@microgate.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arnd@arndb.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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