Re: unit tests and get_user_pages_ptes_fast()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 On 10/05/2010 04:15 PM, Andrea Arcangeli wrote:
On Tue, Oct 05, 2010 at 06:22:17AM -0300, Marcelo Tosatti wrote:
>  It'll not be so advantageous for ksm because there should be read-faults
>  very rarely on that case.

It'll also make all clean swapcache dirty for no good.

>  Will post.

If we've to walk pagetables twice, why don't you do this:

writable=1
get_user_pages_fast(write=write_fault)
if (!write_fault)
    writable = __get_user_pages_fast(write=1)

That will solve the debugging knob and it'll solve ksm and it'll be
optimal for read swapins on exclusive clean swapcache too.

But it means an extra vmexit in the following case:

- read fault
- page is present and writeable in the Linux page table

which is very common.  For this you need get_user_pages_ptes_fast().

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux