From: "Peter W. Morreale" <morreale@radiantdata.com>
To: Kiran Kumar Gaitonde <kiran.gaitonde@globaledgesoft.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Kernel Thread in Device Driver
Date: Fri, 03 Dec 2004 08:31:43 -0700 [thread overview]
Message-ID: <41B086DF.6010107@radiantdata.com> (raw)
In-Reply-To: 41B03BB2.90802@globaledgesoft.com
You might try adding a "yield()" in the loop, perhaps modulo some number of
interrupts handled (assuming, of course, your interrupts are queued).
yield() will place the current task at the 'end' of the run list and
schedule(). If another task is
eligible to execute, it will get the slice.
-PWM
Kiran Kumar Gaitonde wrote:
> Hi all.
>
> I am working on a device driver with the device interrupts are
> actaully serviced in a kernel thread and not in the interrupt handler
> registered with the kernel. The interrupt handler justs wakes up the
> kthread when a interrupt occurs. This is done as we need to use
> semaphores while performing IO to sync the read and writes.
> Now I have come across a situation where the kthread is consuming 70%
> of CPU time as it is in a loop to service the interrupts happening
> very very fast, and it is rearly saying schedule(). The performance of
> the application which uses this device to communicate, is not good as
> it is not getting CPU at the right time.
>
> Can anybody tell me what may be the problem. Also any suggestions to
> overcome this issue?
>
> Thanks in Advance,
>
> Regards,
> Kiran Gaitonde.
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Peter W. Morreale email: morreale@radiantdata.com
Director of Engineering Niwot, Colorado, USA
Radiant Data Corporation voice: (303) 652-0870 x108
-----------------------------------------------------------------------------
This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you.
prev parent reply other threads:[~2004-12-03 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-03 10:10 Kernel Thread in Device Driver Kiran Kumar Gaitonde
2004-12-03 15:31 ` Peter W. Morreale [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=41B086DF.6010107@radiantdata.com \
--to=morreale@radiantdata.com \
--cc=kiran.gaitonde@globaledgesoft.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