From: kartikeyan sadasivuni <s.kartikeyan@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: disabling kernel preemption from user space
Date: Thu, 25 Mar 2010 20:25:26 +0530 [thread overview]
Message-ID: <f750ee71003250755kf02f87au714f634070b94d26@mail.gmail.com> (raw)
Hi,
I have a system where bootloader supports
core0 running linux (control plane).
core1 running application without OS (a data plane app).
(core0 and core1 share some physical memory)
Because of this setup and application requirements
I want to ocassionally disable preemption of linux kernel
for very small periods from user space process.
Is the following valid solution to achive this ?
I will load a kernel module foo.ko which supports the following
ioctl's from user space.
PREEMPT_DISABLE:
calls preempt_disable() from the driver (foo.ko)
PREEMPT_ENABLE:
calls premept_enable() from the driver (foo.ko)
user space process does
ioctl(FOO_FD, PREEMPT_DISABLE, ..);
do some short critcal work
ioctl(FOO_FD, PREEMPT_ENABLE, ..);
Basically I want to know, if preempt_disable() and preempt_enable()
are legal across user to kernel space swtiches are only within kernel.
I don't mind if the solution is wierd/stupid
but works on all 2.6.* kernels.
--
S.Kartikeyan
reply other threads:[~2010-03-25 14:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f750ee71003250755kf02f87au714f634070b94d26@mail.gmail.com \
--to=s.kartikeyan@gmail.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
all inboxes | Powered by JetHome®