You aren''t defining pmd_val_ma for CONFIG_SMP and LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) /* Linux 2.6 isn''t using the traditional batched interface. */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) #define QUEUE_SIZE 2048 #define pte_offset_kernel pte_offset #define pmd_val_ma(v) (v).pmd; #define pud_t pgd_t #define pud_offset(d, va) d #else #ifdef CONFIG_SMP #define QUEUE_SIZE 1 #else #define QUEUE_SIZE 128 #define pmd_val_ma(v) (v).pud.pgd.pgd; #endif #endif unfortunately this doesn''t stop you from using it: void queue_l2_entry_update(pmd_t *ptr, pmd_t val) { int cpu = smp_processor_id(); int idx; unsigned long flags; spin_lock_irqsave(&update_lock, flags); idx = per_cpu(mmu_update_queue_idx, cpu); per_cpu(update_queue[idx], cpu).ptr = virt_to_machine(ptr); per_cpu(update_queue[idx], cpu).val = pmd_val_ma(val); increment_index(); spin_unlock_irqrestore(&update_lock, flags); } void xen_l2_entry_update(pmd_t *ptr, pmd_t val) { int cpu = smp_processor_id(); int idx; unsigned long flags; spin_lock_irqsave(&update_lock, flags); idx = per_cpu(mmu_update_queue_idx, cpu); per_cpu(update_queue[idx], cpu).ptr = virt_to_machine(ptr); per_cpu(update_queue[idx], cpu).val = pmd_val_ma(val); increment_index_and_flush(); spin_unlock_irqrestore(&update_lock, flags); } ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Hi Kip, On Sun, Mar 13, 2005 at 03:32:50PM -0800, Kip Macy wrote:> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) > #define QUEUE_SIZE 2048 > #define pte_offset_kernel pte_offset > #define pmd_val_ma(v) (v).pmd; > #define pud_t pgd_t > #define pud_offset(d, va) d > #else > #ifdef CONFIG_SMP > #define QUEUE_SIZE 1 > #else > #define QUEUE_SIZE 128 > #define pmd_val_ma(v) (v).pud.pgd.pgd; > #endif > #endifI just moved the second #define pmd_val_ma(v) one line down to make it compile. I did not investigate whether it''s correct. I guess not, but I also guess it does no harm. Regards, -- Kurt Garloff <kurt@garloff.de> [Koeln, DE] Physics:Plasma modeling <garloff@plasimo.phys.tue.nl> [TU Eindhoven, NL] Linux: SUSE Labs (Director) <garloff@suse.de> [Novell Inc]
Yeah, I did the same. I just thought I''d report it. -Kip On Mon, 14 Mar 2005 01:09:46 +0100, Kurt Garloff <kurt@garloff.de> wrote:> Hi Kip, > > On Sun, Mar 13, 2005 at 03:32:50PM -0800, Kip Macy wrote: > > #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) > > #define QUEUE_SIZE 2048 > > #define pte_offset_kernel pte_offset > > #define pmd_val_ma(v) (v).pmd; > > #define pud_t pgd_t > > #define pud_offset(d, va) d > > #else > > #ifdef CONFIG_SMP > > #define QUEUE_SIZE 1 > > #else > > #define QUEUE_SIZE 128 > > #define pmd_val_ma(v) (v).pud.pgd.pgd; > > #endif > > #endif > > I just moved the second #define pmd_val_ma(v) one line down to make it > compile. I did not investigate whether it''s correct. I guess not, but > I also guess it does no harm. > > Regards, > -- > Kurt Garloff <kurt@garloff.de> [Koeln, DE] > Physics:Plasma modeling <garloff@plasimo.phys.tue.nl> [TU Eindhoven, NL] > Linux: SUSE Labs (Director) <garloff@suse.de> [Novell Inc] > > >------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Guys, just remember that SMP is certainly not ready for putting in front of users yet. We''re hoping to get back to it sometime this week, but for the moment it should be considered highly experimental. There are currently lots of optimisations disabled too. If someone''s looking for some work to do to help SMP support, it would be great if you could look into out-of-lining all the spinlocks, and then writing some code to no-op them if there''s only one CPU currently active. This would elminate most of the overhead of an SMP vs uni kernel, which would certainly be great for us (as well as for vendor kernels). Ian> -----Original Message----- > From: xen-devel-admin@lists.sourceforge.net > [mailto:xen-devel-admin@lists.sourceforge.net] On Behalf Of > Kurt Garloff > Sent: 14 March 2005 00:10 > To: Kip Macy > Cc: Xen development list > Subject: Re: [Xen-devel] Linux 2.6.11 does not build SMP > > Hi Kip, > > On Sun, Mar 13, 2005 at 03:32:50PM -0800, Kip Macy wrote: > > #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) > > #define QUEUE_SIZE 2048 > > #define pte_offset_kernel pte_offset > > #define pmd_val_ma(v) (v).pmd; > > #define pud_t pgd_t > > #define pud_offset(d, va) d > > #else > > #ifdef CONFIG_SMP > > #define QUEUE_SIZE 1 > > #else > > #define QUEUE_SIZE 128 > > #define pmd_val_ma(v) (v).pud.pgd.pgd; > > #endif > > #endif > > I just moved the second #define pmd_val_ma(v) one line down to make it > compile. I did not investigate whether it''s correct. I guess not, but > I also guess it does no harm. > > Regards, > -- > Kurt Garloff <kurt@garloff.de> > [Koeln, DE] > Physics:Plasma modeling <garloff@plasimo.phys.tue.nl> [TU > Eindhoven, NL] > Linux: SUSE Labs (Director) <garloff@suse.de> > [Novell Inc] >------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Mon, 14 Mar 2005 01:09:46 +0100, Kurt Garloff <kurt@garloff.de> wrote:> I just moved the second #define pmd_val_ma(v) one line down to make it > compile. I did not investigate whether it''s correct. I guess not, but > I also guess it does no harm.Fixed now. Moving it one line down is correct. christian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Mon, 14 Mar 2005, Ian Pratt wrote:> Guys, just remember that SMP is certainly not ready for putting in front > of users yet.It''s been enabled in Fedora Rawhide for a few months now, and doesn''t seem to be giving much trouble at all, at least not stability wise.> If someone''s looking for some work to do to help SMP support, it would > be great if you could look into out-of-lining all the spinlocks, and > then writing some code to no-op them if there''s only one CPU currently > active. This would elminate most of the overhead of an SMP vs uni > kernel, which would certainly be great for us (as well as for vendor > kernels).I''ll take a look. Another thing to do would be yielding the CPU on spinlock contention, in case there are other virtual CPUs that want to run. The timer also causes lots of fun, with many of these every day. This doesn''t cause any stability problems I can see, though - it''s just the timer detecting that something went wrong and bailing out. Timer ISR/1: Time went backwards: -410090000 118469090000000 9910000 11846909000 -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Sun, 13 Mar 2005 21:42:28 -0500 (EST), Rik van Riel <riel@redhat.com> wrote:> On Mon, 14 Mar 2005, Ian Pratt wrote: > > > Guys, just remember that SMP is certainly not ready for putting in front > > of users yet. > > It''s been enabled in Fedora Rawhide for a few months now, > and doesn''t seem to be giving much trouble at all, at > least not stability wise.For you. More than half the builds I do with SMP don''t make it to the prompt. Others have frequent oopses after going through a dozen guest boot/crash cycles. -Kip ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
On Sun, 13 Mar 2005, Kip Macy wrote:> > It''s been enabled in Fedora Rawhide for a few months now, > > and doesn''t seem to be giving much trouble at all, at > > least not stability wise. > > For you. More than half the builds I do with SMP don''t make it to the > prompt. Others have frequent oopses after going through a dozen guest > boot/crash cycles.I wonder why that is - the Xen SMP kernels in Rawhide have been running for people on quite a few different platforms. I am curious if it''s a config thing, a compiler thing or if you''re just unlucky... -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> I wonder why that is - the Xen SMP kernels in Rawhide have > been running for people on quite a few different platforms. > > I am curious if it''s a config thing, a compiler thing or > if you''re just unlucky...Hard to say. I have had almost no problems with UP or native builds. So ineptitude can only be playing a small part. -Kip ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel