Re: [Xen-ia64-devel] xen on SMP

2006-08-25 Thread Daniel Miles
I think you're asking if the schedulers in xen schedule domains or
processes and if that's the case, I have the answer: They schedule
domains or, more accurately, they schedule VCPU's which are assigned to
domains. The kernel in the domU schedules processes within itself. If
you see the term process in a variable name or comment in xen-level
scheduler code, consider it synonymous with the term VCPU.

On Fri, 2006-08-25 at 13:17 +, Rodrigo Lord wrote:
 Hi,
 
 I work wtih Xen in Quad IA 64, and may question is under the BVT: Xen
 scaling processes between processors or Xen scaling VMs between
 processors? For example, I have 4 MV, this MV are load balanced
 between the processors or just his processes are distributed?
 
 thanks
 ___
 Xen-ia64-devel mailing list
 Xen-ia64-devel@lists.xensource.com
 http://lists.xensource.com/xen-ia64-devel


___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel


[Xen-ia64-devel] Re: [Xen-devel] [PATCH] architecture-specific stuff in xend

2006-08-11 Thread Daniel Miles
I tried the patch on an ia64 box and it seemed to work just fine, I
think it's a great idea.

On Thu, 2006-08-10 at 16:12 -0500, Hollis Blanchard wrote:
 On Wed, 2006-08-09 at 17:18 +0100, Ewan Mellor wrote:
  
  Yes, your proposal sounds fine to me. 
 
 OK, here is the first proof-of-concept.
 
 IA64 and HVM people will definitely need to check this over, because it
 looks like there was some *serious* bitrot in this area. (For example, I
 can't see how an HVM domain would have made it into class ImageHandler
 in the first place.)
 
 John, would you extend this scheme to cover host OS differences? I think
 it's worth separating the attributes of the host and the guest, and this
 patch below is all about guest stuff. W.R.T.
 tools/python/xen/util/Brctl.py, wouldn't it make more sense to replace
 that file entirely depending on the host OS?
 
 
 
 [XEND] Abstract architecture-specific guest code into a module.
 Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]
 
 diff -r 8cca42e2610a tools/python/xen/xend/XendDomainInfo.py
 --- a/tools/python/xen/xend/XendDomainInfo.py Thu Aug 10 14:29:04 2006 +0100
 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Aug 10 15:45:00 2006 -0500
 @@ -1279,23 +1279,14 @@ class XendDomainInfo:
  cpu = [ int( cpus[v % len(cpus)] ) ]
  xc.vcpu_setaffinity(self.domid, v, cpu)
  
 -# set domain maxmem in KiB
 -xc.domain_setmaxmem(self.domid, self.info['maxmem'] * 1024)
 -
 -m = self.image.getDomainMemory(self.info['memory'] * 1024)
 -balloon.free(m)
 -
 -init_reservation = self.info['memory'] * 1024
 -if os.uname()[4] in ('ia64', 'ppc64'):
 -# Workaround for architectures that don't yet support
 -# ballooning.
 -init_reservation = m
 -# Following line from [EMAIL PROTECTED]
 -# Needed for IA64 until supports ballooning -- okay for 
 PPC64?
 -xc.domain_setmaxmem(self.domid, m)
 -
 -xc.domain_memory_increase_reservation(self.domid, 
 init_reservation,
 -  0, 0)
 +# set memory limit
 +maxmem = self.image.getRequiredMemory(self.info['maxmem'] * 1024)
 +xc.domain_setmaxmem(self.domid, maxmem)
 +
 +# initial memory allocation
 +mem_kb = self.image.getRequiredMemory(self.info['memory'] * 1024)
 +balloon.free(mem_kb)
 +xc.domain_memory_increase_reservation(self.domid, mem_kb, 0, 0)
  
  self.createChannels()
  
 diff -r 8cca42e2610a tools/python/xen/xend/image.py
 --- a/tools/python/xen/xend/image.py  Thu Aug 10 14:29:04 2006 +0100
 +++ b/tools/python/xen/xend/image.py  Thu Aug 10 15:45:21 2006 -0500
 @@ -27,6 +27,7 @@ from xen.xend.XendLogging import log
  from xen.xend.XendLogging import log
  from xen.xend.server.netif import randomMAC
  from xen.xend.xenstore.xswatch import xswatch
 +from xen.xend import arch
  
 
  xc = xen.lowlevel.xc.xc()
 @@ -141,17 +142,8 @@ class ImageHandler:
  raise VmError('Building domain failed: ostype=%s dom=%d err=%s'
% (self.ostype, self.vm.getDomid(), str(result)))
  
 -
 -def getDomainMemory(self, mem_kb):
 -@return The memory required, in KiB, by the domain to store the
 -given amount, also in KiB.
 -if os.uname()[4] != 'ia64':
 -# A little extra because auto-ballooning is broken w.r.t. HVM
 -# guests. Also, slack is necessary for live migration since that
 -# uses shadow page tables.
 -if 'hvm' in xc.xeninfo()['xen_caps']:
 -mem_kb += 4*1024;
 -return mem_kb
 +def getRequiredMemory(self, domain_kb):
 +return domain_kb
  
  def buildDomain(self):
  Build the domain. Define in subclass.
 @@ -349,20 +341,8 @@ class HVMImageHandler(ImageHandler):
  os.waitpid(self.pid, 0)
  self.pid = 0
  
 -def getDomainMemory(self, mem_kb):
 -@see ImageHandler.getDomainMemory
 -if os.uname()[4] == 'ia64':
 -page_kb = 16
 -# ROM size for guest firmware, ioreq page and xenstore page
 -extra_pages = 1024 + 2
 -else:
 -page_kb = 4
 -# This was derived emperically:
 -#   2.4 MB overhead per 1024 MB RAM + 8 MB constant
 -#   + 4 to avoid low-memory condition
 -extra_mb = (2.4/1024) * (mem_kb/1024.0) + 12;
 -extra_pages = int( math.ceil( extra_mb*1024 / page_kb ))
 -return mem_kb + extra_pages * page_kb
 +def getRequiredMemory(self, domain_kb):
 +return arch.HVMRequiredMemory(domain_kb)
  
  def register_shutdown_watch(self):
   add xen store watch on control/shutdown 
 diff -r 8cca42e2610a tools/python/xen/xend/arch/__init__.py
 --- /dev/null Thu Jan 01 00:00:00 1970 +
 +++ 

Re: [Xen-ia64-devel] [PATCH] add SATA support in x86_64 and fix error handling in xm create

2006-05-23 Thread Daniel Miles
On Mon, 2006-05-22 at 17:59 -0600, Alex Williamson wrote:

Did you mean to send this to xen-devel?
heh... yes, I did. I apologize.


signature.asc
Description: This is a digitally signed message part
___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel

[Xen-ia64-devel] [PATCH] add SATA support in x86_64 and fix error handling in xm create

2006-05-22 Thread Daniel Miles
This patch changes two files: First, the x86_64 build config file,
turning on SATA support. Second, tools/python/xen/xm/create.py. In the
tools/python/xen/xm directory, main.py has good error messages that let
the user know what failed; the other 'sub-command' classes don't always
have such good messages which can lead to some inexplicable failures by
the user-space tools.

Standard practice is to except each error by type and react accordingly
but in case the programmer does not anticipate a type of exception,
standard practice is to put in a catch-all exception handler that
excepts an 'Exception' object. Often in this case, the system will print
out the exception and exit.

If a sub-command excepts an 'Exception' object and the error is not
specific to that sub-command, it should pass the exception up for main
to handle. Especially in light of the fact that there is already a broad
collection of good error messages in main, I believe that this will lead
to better code re-use in the form of a one-stop-shop for error messages.

In this patch I've changed only one of the general case exception
handlers in one of the sub-commands (xm create) as a test-balloon to see
if the xen community will accept future patches of this type.

Singed-off-by: Daniel Miles [EMAIL PROTECTED]
diff -r 7cbc1fc8dbea buildconfigs/linux-defconfig_xen_x86_64
--- a/buildconfigs/linux-defconfig_xen_x86_64	Tue May 16 18:54:41 2006
+++ b/buildconfigs/linux-defconfig_xen_x86_64	Mon May 22 17:23:31 2006
@@ -934,8 +934,8 @@
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
+CONFIG_BLK_DEV_IDE_SATA=y
+CONFIG_BLK_DEV_HD_IDE=y
 CONFIG_BLK_DEV_IDEDISK=m
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_BLK_DEV_IDECS is not set
diff -r 7cbc1fc8dbea tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py	Tue May 16 18:54:41 2006
+++ b/tools/python/xen/xm/create.py	Mon May 22 17:23:31 2006
@@ -903,10 +903,15 @@
 else:
 err(%s % ex.faultString)
 except Exception, ex:
+#main.py has good error messages that let the user know what failed.
+#unless the error is a create.py specific thing, it should be handled
+#at main. The purpose of this general-case 'Exception' handler is to
+#clean up create.py specific processes/data but since create.py does
+#not know what to do with the error, it should pass it up.
 import signal
 if vncpid:
 os.kill(vncpid, signal.SIGKILL)
-err(str(ex))
+raise ex
 
 dom = sxp.child_value(dominfo, 'name')
 


signature.asc
Description: This is a digitally signed message part
___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel

[Xen-ia64-devel] [PATCH] add LVM support to kernel configuration

2006-04-03 Thread Daniel Miles
Hi everybody.

I let the Red Hat installer decide how to partition my disks and it used
logical volumes so I found that I needed support for them in my kernel.
This is just a tiny patch that turns on those configuration options.

Signed-off-by: Daniel Miles [EMAIL PROTECTED]


diff -r d76a7a40f3a9 buildconfigs/linux-defconfig_xen_ia64
--- a/buildconfigs/linux-defconfig_xen_ia64	Fri Mar 31 16:44:26 2006
+++ b/buildconfigs/linux-defconfig_xen_ia64	Fri Mar 31 17:20:15 2006
@@ -487,7 +487,13 @@
 #
 CONFIG_MD=y
 # CONFIG_BLK_DEV_MD is not set
-# CONFIG_BLK_DEV_DM is not set
+CONFIG_BLK_DEV_DM=y
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
 
 #
 # Fusion MPT device support


signature.asc
Description: This is a digitally signed message part
___
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel