Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1582939
| From | Waiman Long <longman@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 2/2] x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64 |
| Date | 2017-02-16 22:10 +0100 |
| Message-ID | <tbBtn-3uQ-5@gated-at.bofh.it> (permalink) |
| References | <tbfsS-5g5-1@gated-at.bofh.it> <tbfsS-5g5-7@gated-at.bofh.it> <tbxpM-zM-31@gated-at.bofh.it> |
| Organization | Red Hat |
On 02/16/2017 11:48 AM, Peter Zijlstra wrote: > On Wed, Feb 15, 2017 at 04:37:50PM -0500, Waiman Long wrote: >> +/* >> + * Hand-optimize version for x86-64 to avoid 8 64-bit register saving and >> + * restoring to/from the stack. It is assumed that the preempted value >> + * is at an offset of 16 from the beginning of the kvm_steal_time structure >> + * which is verified by the BUILD_BUG_ON() macro below. >> + */ >> +#define PREEMPTED_OFFSET 16 > As per Andrew's suggestion, the 'right' way is something like so. Thanks for the tip. I was not aware of the asm-offsets stuff. I will update the patch to use it. Cheers, Longman
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/2] x86/kvm: Reduce vcpu_is_preempted() overhead Waiman Long <longman@redhat.com> - 2017-02-15 22:40 +0100
[PATCH v4 2/2] x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64 Waiman Long <longman@redhat.com> - 2017-02-15 22:40 +0100
Re: [PATCH v4 2/2] x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64 Peter Zijlstra <peterz@infradead.org> - 2017-02-16 17:50 +0100
Re: [PATCH v4 2/2] x86/kvm: Provide optimized version of vcpu_is_preempted() for x86-64 Waiman Long <longman@redhat.com> - 2017-02-16 22:10 +0100
[PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long Waiman Long <longman@redhat.com> - 2017-02-15 22:40 +0100
Re: [PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long Peter Zijlstra <peterz@infradead.org> - 2017-02-16 17:20 +0100
Re: [PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long Waiman Long <longman@redhat.com> - 2017-02-16 22:10 +0100
Re: [PATCH v4 1/2] x86/paravirt: Change vcp_is_preempted() arg type to long Peter Zijlstra <peterz@infradead.org> - 2017-02-17 10:50 +0100
csiph-web