2000-12-07 14:23:16

by Martin Schwidefsky

[permalink] [raw]
Subject: 64 bit s390 and 2.4.0-test11 (was Memory management bug)




Hi,
good news (at least for us): linux on the 64 bit S/390 (aka zServer)
is now running pretty stable. Our implementation of ptep_get_and_clear
didn't clear the pte if the invalid bit was already set. But a swapped
page has the invalid bit set too and in that case we didn't clear the
pte. That did cause the BUG() in swap_state.c:60.

With this new backend in mind I'd like to suggest two small changes
for the common code.
1) move establish_pte to the architecture dependent folders. Our
implementation looks like this:

static inline void ptep_invalidate_and_flush(pte_t *ptep, unsigned long
addr)
{
if (!(pte_val(*ptep) & _PAGE_INVALID))
__asm__ __volatile__ ("ipte %0,%1" : : "a" (ptep), "a"
(addr));
}

static inline void establish_pte(struct vm_area_struct * vma,
unsigned long address,
pte_t *page_table, pte_t entry)
{
ptep_invalidate_and_flush(page_table, address);
set_pte(page_table, entry);
}

The question I face at the moment is: where is the right place in
include/asm for establish_pte. I added it to include/asm-generic/pgtable.h
and include/asm-i386/pgtable.h but I now face the problem that the
default implementation has a call to flush_tlb_page and that is defined
in pgalloc.h. I added an #include <asm/pgalloc.h> but I fear that this
could
cause compile errors. For details see establish_pte.diff.

2) add a check for EI_CLASS in the binfmt_elf loader. We will use the
same EM_S390 for 31 bit and 64 bit binaries. The distinction is done
by means of the EI_CLASS byte in the ELF header. See binfmt_elf.diff

blue skies,
Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Sch?naicherstr. 220, D-71032 B?blingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: [email protected]

(See attached file: establish_pte.diff)(See attached file: binfmt_elf.diff)


Attachments:
(No filename) (1.86 kB)
establish_pte.diff (2.64 kB)
binfmt_elf.diff (724.00 B)
Download all attachments