Re: How should anaconda check for PAE? (was Re: arch fun.)
On Wed, 25 Feb 2009 14:15:37 +0100 Thorsten Leemhuis wrote: > On 25.02.2009 13:27, Chris Lalancette wrote: > > Gerd Hoffmann wrote: > >> We can also simply do this: > >> > >> - Install PAE kernel if the CPU supports PAE. > >> > >> i.e. make PAE the default kernel. > > > > Yes, I really think we should just do this. It's simple, it means we get > > the > > logic right for Xen as well as bare-metal (without any special cases), and > > the > > performance hit for those who have PAE and < 4GB isn't that bad, I don't > > think > > (although numbers one way or the other would be interesting to see). > > What about compatibility problems? My old laptop had a PAE capable CPU > but could not boot a PAE kernel -- I noticed when I was trying a PAE > kernel for some tests two or three years ago. I asked a kernel-developer > back then if it was worth reporting and I got told that such problems > are not unusual and often BIOS or hardware problems. Those likely didn't > vanish magically is that statement is correct. > > The algorithm I posted should handle that. If you support NX or you have >4GB of memory then it's pretty much impossible for you to have one of those old CPUs. And all SVM/VMX capable machines support NX so we'd always have the right kernel for them too. ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
Thorsten Leemhuis wrote: > On 25.02.2009 13:27, Chris Lalancette wrote: >> Gerd Hoffmann wrote: >>> We can also simply do this: >>> >>> - Install PAE kernel if the CPU supports PAE. >>> >>> i.e. make PAE the default kernel. >> Yes, I really think we should just do this. It's simple, it means we get the >> logic right for Xen as well as bare-metal (without any special cases), and >> the >> performance hit for those who have PAE and < 4GB isn't that bad, I don't >> think >> (although numbers one way or the other would be interesting to see). > > What about compatibility problems? My old laptop had a PAE capable CPU > but could not boot a PAE kernel -- I noticed when I was trying a PAE > kernel for some tests two or three years ago. I asked a kernel-developer > back then if it was worth reporting and I got told that such problems > are not unusual and often BIOS or hardware problems. Those likely didn't > vanish magically is that statement is correct. Hm, it's an interesting point, and not one that I've heard about or seen before. Xen in Fedora required PAE for quite some time, and despite plenty of other problems (mostly having to do with people wanting to run Xen on non-PAE platforms), we didn't hear about any of this specific problem. Doesn't mean it doesn't exist, though :). Do you have pointers to specific problems? A quick google didn't turn up anything, but I didn't try all that hard. -- Chris Lalancette ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
On 25.02.2009 13:27, Chris Lalancette wrote: Gerd Hoffmann wrote: We can also simply do this: - Install PAE kernel if the CPU supports PAE. i.e. make PAE the default kernel. Yes, I really think we should just do this. It's simple, it means we get the logic right for Xen as well as bare-metal (without any special cases), and the performance hit for those who have PAE and < 4GB isn't that bad, I don't think (although numbers one way or the other would be interesting to see). What about compatibility problems? My old laptop had a PAE capable CPU but could not boot a PAE kernel -- I noticed when I was trying a PAE kernel for some tests two or three years ago. I asked a kernel-developer back then if it was worth reporting and I got told that such problems are not unusual and often BIOS or hardware problems. Those likely didn't vanish magically is that statement is correct. BTW, does anyone know when Windows XP SP2/Vista uses it PAE-still-limited-to-4gb-kernel to support NX? Maybe we should use a similar scheme to avoid running into hardware issues. CU knurd ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
Gerd Hoffmann wrote: > We can also simply do this: > > - Install PAE kernel if the CPU supports PAE. > > i.e. make PAE the default kernel. Yes, I really think we should just do this. It's simple, it means we get the logic right for Xen as well as bare-metal (without any special cases), and the performance hit for those who have PAE and < 4GB isn't that bad, I don't think (although numbers one way or the other would be interesting to see). -- Chris Lalancette ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
Will Woods wrote: > (PAE_flag and >=4GB RAM) or (PAE_flag and vmx_flag and >=1GB RAM) > > where vmx_flag is the flag for hardware virt stuff. Is this a good test? No. > Some further questions: > - Is a PAE kernel required for proper virt support? Xen stopped supporting non-PAE (paravirt) guest kernels recently. Even before that everything ran in PAE mode because PAE was a compile time option for Xen (i.e. mixing PAE and non-PAE guests wasn't possible). So, yes, for Xen the PAE kernel is mandatory. No, the vmx bit isn't a good test, paravirtualized xen guests don't need hardware support. For kvm it doesn't matter I think. I'd say we want in any case ... (1) Install PAE kernel if there is RAM mapped above 4G. (2) Install PAE kernel if the CPU supports NX (regardless of the installed memory). I don't see the point in checking for vmx/svm. Beside that I think there is no hardware which has virtualization hardware support but hasn't nx, so the check would be superfluous anyway. We can also simply do this: - Install PAE kernel if the CPU supports PAE. i.e. make PAE the default kernel. cheers, Gerd ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
On Tue, 24 Feb 2009 15:38:42 -0800 (PST) Roland McGrath wrote: > > If we have NX (which anything made in the last few years will) > > it's a performance win to use the hardware NX instead of the > > segment limit hack we implemented in execshield. > > It's more than performance. The segment limit hack is a hack, and does not > actually do full enforcement in all cases (though we have already bent over > backward to ensure that these cases do not come up by default). > Hardware NX is 100% reliable. > We also need to look for lm to see if we can install a 64-bit kernel. So something like: if (lm) install 64-bit else if (!pae) || (!nx && memory < 4GB) install i586 else install PAE ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
> If we have NX (which anything made in the last few years will) > it's a performance win to use the hardware NX instead of the > segment limit hack we implemented in execshield. It's more than performance. The segment limit hack is a hack, and does not actually do full enforcement in all cases (though we have already bent over backward to ensure that these cases do not come up by default). Hardware NX is 100% reliable. > Syscalls in particular should be a lot faster, as you get to > use the sysenter/sysexit instructions which are faster than using > the int 80h entrypoint. (The way the segment limits work is > incompatible with sysenter/sysexit). This is indeed quite a big hit. Thanks, Roland ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
On Tue, Feb 24, 2009 at 06:22:00PM -0500, Will Woods wrote: > On Fri, 2009-02-06 at 10:19 -0500, Bill Nottingham wrote: > > Chris Lalancette ([email protected]) said: > > > Do we know if anaconda is going to change > > > to choose kernel-PAE for any machine with the PAE flag, regardless of > > > the amount > > > of memory? > > > > That's the plan - the patch should be pretty trivial. > > I haven't seen this patch yet. As far as I can tell, current anaconda > installs the PAE kernel by default if isPaeAvailable() returns true[1]. > > isPaeAvailable() uses the (somewhat odd) test of checking to see > if /proc/iomem has a line where the start address is more than 32 bits > long[2] - AFAICT it ignores the cpu flags entirely. So the current rationale is 'if we have >4G of RAM, install the PAE kernel'. It does that iomem poking because the kernel used at install time isn't capable of seeing memory past 4G. So it's the best way of saying "do we have >4G?" > In a discussion on IRC earlier today, cebbert mentioned that we might > want a check more like: > > (PAE_flag and >=4GB RAM) or (PAE_flag and vmx_flag and >=1GB RAM) > > where vmx_flag is the flag for hardware virt stuff. Is this a good test? or (PAE_flag and NX_flag) > Some further questions: > - Is a PAE kernel required for proper virt support? Xen needs it. > - Should we be using the PAE kernel *regardless* of memory size (as > implied above) or do we want some memory requirements? If we have NX (which anything made in the last few years will) it's a performance win to use the hardware NX instead of the segment limit hack we implemented in execshield. There is a tradeoff for using larger page table entries, but it's probably still a lot cheaper than the overhead of the seglimit hack. Syscalls in particular should be a lot faster, as you get to use the sysenter/sysexit instructions which are faster than using the int 80h entrypoint. (The way the segment limits work is incompatible with sysenter/sysexit). Dave -- http://www.codemonkey.org.uk ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
Re: How should anaconda check for PAE? (was Re: arch fun.)
> - Should we be using the PAE kernel *regardless* of memory size (as > implied above) or do we want some memory requirements? It's always preferable on hardware (where pae actually works) that also has the nx cpu feature. True PROT_EXEC enforcement (NX) is only available in PAE mode. Thanks, Roland ___ Fedora-kernel-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/fedora-kernel-list
