All of lore.kernel.org
 help / color / mirror / Atom feed
* Linux 2.6.11 does not build SMP
@ 2005-03-13 23:32 Kip Macy
  2005-03-14  0:09 ` Kurt Garloff
  0 siblings, 1 reply; 9+ messages in thread
From: Kip Macy @ 2005-03-13 23:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Christian Limpach, Keir Fraser, Ian.Pratt

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Linux 2.6.11 does not build SMP
@ 2005-03-14  0:47 Ian Pratt
  2005-03-14  2:42 ` Rik van Riel
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Pratt @ 2005-03-14  0:47 UTC (permalink / raw)
  To: Kurt Garloff, Kip Macy; +Cc: Xen development list, ian.pratt


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_id\x14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-03-14  5:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-13 23:32 Linux 2.6.11 does not build SMP Kip Macy
2005-03-14  0:09 ` Kurt Garloff
2005-03-14  0:13   ` Kip Macy
2005-03-14  1:40   ` Christian Limpach
  -- strict thread matches above, loose matches on Subject: below --
2005-03-14  0:47 Ian Pratt
2005-03-14  2:42 ` Rik van Riel
2005-03-14  2:54   ` Kip Macy
2005-03-14  4:49     ` Rik van Riel
2005-03-14  5:04       ` Kip Macy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.