Re: [PATCH/RFC] Shared page tables

Dave McCracken
2006-01-07T18:09:29Z

--On Saturday, January 07, 2006 13:25:34 +0100 Heiko Carstens
<heiko.carstens@de.ibm.com> wrote:

>> The primary purpose of sharing page tables is improved performance for
>> large applications that share big memory areas between multiple
>> processes. It eliminates the redundant page tables and significantly
>> reduces the number of minor page faults. Tests show significant
>> performance improvement for large database applications, including those
>> using large pages. There is no measurable performance degradation for
>> small processes.
>
> Tried to get this running with CONFIG_PTSHARE and CONFIG_PTSHARE_PTE on
> s390x. Unfortunately it crashed on boot, because pt_share_pte
> returned a broken pte pointer:

The patch as submitted only works on i386 and x86_64. Sorry.

>> +pte_t *pt_share_pte(struct vm_area_struct *vma, unsigned long address,
>> pmd_t *pmd, + ...
>> + pmd_val(spmde) = 0;
>> + ...
>> + if (pmd_present(spmde)) {
>
> This is wrong. A pmd_val of 0 will make pmd_present return true on s390x
> which is not what you want.
> Should be pmd_clear(&spmde).
>
>> +pmd_t *pt_share_pmd(struct vm_area_struct *vma, unsigned long address,
>> pud_t *pud, + ...
>> + pud_val(spude) = 0;
>
> Should be pud_clear, I guess :)

Yes, you're right. pmd_clear() and pud_clear() would be more portable.
I'll make that change.

Dave McCracken