From: Ingo Molnar <mingo@elte.hu>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
James Carter <jwcart2@tycho.nsa.gov>,
Paul Moore <paul.moore@hp.com>, James Morris <jmorris@namei.org>
Subject: Re: [bug] very high non-preempt latency in context_struct_compute_av()
Date: Thu, 7 Jun 2007 21:51:51 +0200 [thread overview]
Message-ID: <20070607195151.GA30899@elte.hu> (raw)
In-Reply-To: <1181244850.11979.66.camel@moss-spartans.epoch.ncsc.mil>
* Stephen Smalley <sds@tycho.nsa.gov> wrote:
> Can you try the patch below to see whether it helps?
>
> In security_get_user_sids, move the transition permission checks
> outside of the section holding the policy rdlock, and use the AVC to
> perform the checks, calling cond_resched after each one. These
> changes should allow preemption between the individual checks and
> enable caching of the results. It may however increase the overall
> time spent in the function in some cases, particularly in the cache
> miss case.
>
> The long term fix will be to take much of this logic to userspace by
> exporting additional state via selinuxfs, and ultimately deprecating
> and eliminating this interface from the kernel.
>
> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
i have just tried your patch and it completely solves the issue! Without
the patch, a simple script that keeps logging in on a box:
while :; do ssh testbox true; done
would cause glxgears to get into a very jerky motion due to the
latencies. With the patch it's 100%, totally smooth! Thanks!
Tested-by: Ingo Molnar <mingo@elte.hu>
Ingo
next prev parent reply other threads:[~2007-06-07 19:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 11:27 [bug] very high non-preempt latency in context_struct_compute_av() Ingo Molnar
2007-06-04 13:25 ` James Morris
2007-06-04 14:17 ` Ingo Molnar
2007-06-04 21:11 ` Paul Moore
2007-06-04 21:39 ` Stephen Smalley
2007-06-04 22:48 ` Paul Moore
2007-06-04 22:54 ` James Morris
2007-06-07 19:34 ` Stephen Smalley
2007-06-07 19:51 ` Ingo Molnar [this message]
2007-06-07 20:11 ` James Morris
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=20070607195151.GA30899@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=jmorris@namei.org \
--cc=jwcart2@tycho.nsa.gov \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.moore@hp.com \
--cc=sds@tycho.nsa.gov \
/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