From: "H. Peter Anvin" <hpa@zytor.com>
To: Sarah Newman <srn@prgmr.com>, David Vrabel <david.vrabel@citrix.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCHv1] x86: don't schedule when handling #NM exception
Date: Sun, 16 Mar 2014 20:33:46 -0700 [thread overview]
Message-ID: <1ebfa80c-4a68-4602-bc98-e5d5f0893998@email.android.com> (raw)
In-Reply-To: <53266841.6090308@prgmr.com>
No, the right thing is to unf*ck the Xen braindamage and use eagerfpu as a workaround for the legacy hypervisor versions.
GFP_ATOMIC -> SIGKILL is definitely a NAK.
On March 16, 2014 8:13:05 PM PDT, Sarah Newman <srn@prgmr.com> wrote:
>On 03/10/2014 10:15 AM, David Vrabel wrote:
>> On 10/03/14 16:40, H. Peter Anvin wrote:
>>> On 03/10/2014 09:17 AM, David Vrabel wrote:
>>>> math_state_restore() is called from the #NM exception handler. It
>may
>>>> do a GFP_KERNEL allocation (in init_fpu()) which may schedule.
>>>>
>>>> Change this allocation to GFP_ATOMIC, but leave all the other
>callers
>>>> of init_fpu() or fpu_alloc() using GFP_KERNEL.
>>>
>>> And what the [Finnish] do you do if GFP_ATOMIC fails?
>>
>> The same thing it used to do -- kill the task with SIGKILL. I
>haven't
>> changed this behaviour.
>>
>>> Sarah's patchset switches Xen PV to use eagerfpu unconditionally,
>which
>>> removes the dependency on #NM and is the right thing to do.
>>
>> Ok. I'll wait for this series and not pursue this patch any further.
>
>Sorry, this got swallowed by my mail filter.
>
>I did some more testing and I think eagerfpu is going to noticeably
>slow things down. When I ran
>"time sysbench --num-threads=64 --test=threads run" I saw on the order
>of 15% more time spent in
>system mode and this seemed consistent over different runs.
>
>As for GFP_ATOMIC, unfortunately I don't know a sanctioned test here so
>I rolled my own. This test
>sequentially allocated math-using processes in the background until it
>could not any more. On a
>64MB instance, I saw 10% fewer processes allocated with GFP_ATOMIC
>compared to GFP_KERNEL when I
>continually allocated new processes up to OOM conditions (256 vs 228.)
>A similar test on a
>different RFS and a kernel using GFP_NOWAIT showed pretty much no
>difference in how many processes I
>could allocate. This doesn't seem too bad unless there is some kind of
>fragmentation over time which
>would cause worse performance.
>
>Since performance degradation applies at all times and not just under
>extreme conditions, I think
>the lesser evil will actually be GFP_ATOMIC. But it's not necessary to
>always use GFP_ATOMIC, only
>under certain conditions - IE when the xen PVABI forces us to.
>
>Patches will be supplied shortly.
--
Sent from my mobile phone. Please pardon brevity and lack of formatting.
next prev parent reply other threads:[~2014-03-17 3:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 16:17 David Vrabel
2014-03-10 16:40 ` H. Peter Anvin
2014-03-10 17:15 ` David Vrabel
2014-03-10 17:25 ` H. Peter Anvin
2014-03-17 3:13 ` Sarah Newman
2014-03-17 3:32 ` [PATCH] x86, fpu, xen: Allocate fpu state for xen pv based on PVABI behavior Sarah Newman
2014-03-17 3:33 ` H. Peter Anvin [this message]
2014-03-17 3:35 ` [Xen-devel] [PATCHv1] x86: don't schedule when handling #NM exception Sarah Newman
2014-03-17 3:43 ` H. Peter Anvin
2014-03-17 4:12 ` Sarah Newman
2014-03-17 4:23 ` H. Peter Anvin
2014-03-20 0:00 ` Greg Kroah-Hartman
2014-03-20 2:29 ` H. Peter Anvin
2014-03-17 13:29 ` David Vrabel
2014-03-19 13:21 ` Konrad Rzeszutek Wilk
2014-03-19 15:02 ` H. Peter Anvin
2014-06-23 13:08 ` Konrad Rzeszutek Wilk
2015-03-05 22:08 ` H. Peter Anvin
2015-03-06 11:46 ` [PATCHv4] x86, fpu: remove the logic of non-eager fpu mem allocation at the first usage David Vrabel
2014-03-17 12:19 ` [Xen-devel] [PATCHv1] x86: don't schedule when handling #NM exception George Dunlap
2014-03-17 16:55 ` H. Peter Anvin
2014-03-17 17:05 ` Jan Beulich
2014-03-17 17:12 ` H. Peter Anvin
2014-03-18 8:14 ` Ingo Molnar
2014-03-17 17:14 ` George Dunlap
2014-03-18 18:17 ` Sarah Newman
2014-03-18 18:27 ` H. Peter Anvin
2014-03-10 16:45 ` H. Peter Anvin
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=1ebfa80c-4a68-4602-bc98-e5d5f0893998@email.android.com \
--to=hpa@zytor.com \
--cc=david.vrabel@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=srn@prgmr.com \
--cc=tglx@linutronix.de \
--cc=xen-devel@lists.xen.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
Powered by JetHome