[lc-devel] 2.4.16-0.20pre2 NOT working under UML
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@im...> - 2001-12-12 21:19:41
|
Hi, The 2.4.16-0.20pre2 version is not currently working under User Mode Linux (at least not up to 2.4.16-2um). There's a problem regarding ptes and the virtual swap addresses used by our code. We don't know why some bits are not correctly updated, what messes up everything when a pte faults a not updated address. Check the email I sent to user-mode-linux-devel mailing list below (no reply so far). If somebody feels like digging deep into this problem, it would be very helpful. I don't know very much of UML internals, so I don't know exactly what's going on there with respect to pte, tlb, etc. ----- Forwarded message from Rodrigo Souza de Castro <rc...@im...> ----- Date: Wed, 12 Dec 2001 12:07:15 -0200 From: Rodrigo Souza de Castro <rc...@im...> Subject: [uml-devel] swap entry and newpage bit To: use...@li... Delivered-To: rc...@im... Hi, [Jeff, I talked to you yesterday about this problem] In my code, I use a virtual swap address, which is nothing but an ordinary swap entry, but its type is MAX_SWAPFILES. This address is assigned to a pte in try_to_swap_out(), like an usual swap entry and that's _all_ (there some other stuff wrt to these ptes, but I removed). It should work as usual swap addresses do work, right? But it does not, at least under UML (on a real machine it does). The problem I noticed is that, when setting a pte to a swap entry, the NEWPAGE bit is turned on to tell fix_range() that this address should be unmapped. It turns out that, for swap adresses that are shared by many ptes, the address is not unmapped and the NEWPAGE bit is not turned off soon enough before any pte faults. Then, in fault handlers (handle_pte_fault() and do_swap_page()), the pte has a wrong value, so I can't find the page in swap cache. For example, if the swap cache page is set to 0x3307c and the wrong pte is set to 0x3307e (due to newpage bit), I won't be able to find it. In _switch_to, everytime we swith to a new task, you flush its tlb (flush_tlb_all()), so there shouldn't have this problem. An important question before bother you more: do you think that it's UML-related or it's unlikely? I added a printk to fix_range when fixing my virtual swap entries and the problem was gone. Will it be a race condition? I am not doing anything but setting the pte in try_to_swap_out and handling faults in do_swap_page(), so I have no clue. :-( The same code was working in the old 2.4.10, when the newpage bit was not set for swap entries. Regards, -- Rodrigo S. de Castro <rc...@im...> _______________________________________________ User-mode-linux-devel mailing list Use...@li... https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ----- End forwarded message ----- -- Rodrigo S. de Castro <rc...@im...> |