Skip to contentSkip to conversation

Patch question (Hyper-Threading support)

DISCUSSION Elizeu Santos-Neto 3 participants 7 messages Mar 24, 2006 – Mar 28, 2006

lore
Share & tools
lore
#0 lore raw

Hi community,

I've been working on modifying Xen and the Xen-Linux kernel to make
vCPU better represent Hyper-Threading physical CPUs, as I mentioned in a previous post.

http://lists.xensource.com/archives/html/xen-devel/2006-01/msg00853.html

I produced some performance measurements and patches that might be
useful for some Hyper-Threading friendly workloads running on Xen. I'll make the performance measurement report available soon.

	Basically, the modified files were:

	xen/common/domain.c
	xen/common/sched_bvt.c
	xen/common/sched_sedf.c
	xen/common/schedule.c
	xen/include/public/vcpu.h
	xen/include/xen/sched.h
	xen/arch/x86/smpboot.c

	How should I proceed to send the patch?

	Thanks,
	./Eli
#1 lore raw
Quoted 23 lines · On Fri, 24 Mar 2006 13:30:18 -0600 Elizeu Santos-Neto <[email protected]>…

Hi community,

I've been working on modifying Xen and the Xen-Linux kernel to make
vCPU better represent Hyper-Threading physical CPUs, as I mentioned in a previous post.

http://lists.xensource.com/archives/html/xen-devel/2006-01/msg00853.html

I produced some performance measurements and patches that might be
useful for some Hyper-Threading friendly workloads running on Xen. I'll make the performance measurement report available soon.

Basically, the modified files were:

xen/common/domain.c
xen/common/sched_bvt.c
xen/common/sched_sedf.c
xen/common/schedule.c
xen/include/public/vcpu.h
xen/include/xen/sched.h
xen/arch/x86/smpboot.c

Quoted 1 line

How should I proceed to send the patch?

There is a guide here:

http://wiki.xensource.com/xenwiki/SubmittingXenPatches

For examples, see:

http://lists.xensource.com/archives/html/xen-devel/

Also see these guidelines:

http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
http://linux.yyz.us/patch-format.html

I would think replying to your patch email with the performance measurement report would help keep them together for people.

Tim

#2 lore raw

Hi Tim,

Thanks a lot. I'm going to prepare the patches and send the report
together.

Regards,
Eli

Quoted 49 lines · Tim Freeman
Quoted 23 lines · On Fri, 24 Mar 2006 13:30:18 -0600 Elizeu Santos-Neto <[email protected]>…

Hi community,

I've been working on modifying Xen and the Xen-Linux kernel to make
vCPU better represent Hyper-Threading physical CPUs, as I mentioned in a previous post.

http://lists.xensource.com/archives/html/xen-devel/2006-01/msg00853.html

I produced some performance measurements and patches that might be
useful for some Hyper-Threading friendly workloads running on Xen. I'll make the performance measurement report available soon.

Basically, the modified files were:

xen/common/domain.c
xen/common/sched_bvt.c
xen/common/sched_sedf.c
xen/common/schedule.c
xen/include/public/vcpu.h
xen/include/xen/sched.h
xen/arch/x86/smpboot.c

Quoted 1 line

How should I proceed to send the patch?

There is a guide here:

http://wiki.xensource.com/xenwiki/SubmittingXenPatches

For examples, see:

http://lists.xensource.com/archives/html/xen-devel/

Also see these guidelines:

http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
http://linux.yyz.us/patch-format.html

I would think replying to your patch email with the performance measurement report would help keep them together for people.

Tim

#3 lore raw
In reply to Tim Freeman

Hi all,

Well, based on some quick inspections on the that I checked out from
the mercurial repository this afternoon, it seems that the HT support has been already implemented. :-)

Thus, here is a suggestion, it would be nice to make more details
available about who is doing what and in which phase of development things are, this information could avoid duplicated efforts.

Thanks,
Eli

Quoted 49 lines · Tim Freeman
Quoted 23 lines · On Fri, 24 Mar 2006 13:30:18 -0600 Elizeu Santos-Neto <[email protected]>…

Hi community,

I've been working on modifying Xen and the Xen-Linux kernel to make
vCPU better represent Hyper-Threading physical CPUs, as I mentioned in a previous post.

http://lists.xensource.com/archives/html/xen-devel/2006-01/msg00853.html

I produced some performance measurements and patches that might be
useful for some Hyper-Threading friendly workloads running on Xen. I'll make the performance measurement report available soon.

Basically, the modified files were:

xen/common/domain.c
xen/common/sched_bvt.c
xen/common/sched_sedf.c
xen/common/schedule.c
xen/include/public/vcpu.h
xen/include/xen/sched.h
xen/arch/x86/smpboot.c

Quoted 1 line

How should I proceed to send the patch?

There is a guide here:

http://wiki.xensource.com/xenwiki/SubmittingXenPatches

For examples, see:

http://lists.xensource.com/archives/html/xen-devel/

Also see these guidelines:

http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
http://linux.yyz.us/patch-format.html

I would think replying to your patch email with the performance measurement report would help keep them together for people.

Tim

#4 lore raw
Quoted 7 lines · Elizeu Santos-Neto

Well, based on some quick inspections on the that I checked out from
the mercurial repository this afternoon, it seems that the HT support has been already implemented. :-)

Thus, here is a suggestion, it would be nice to make more details
available about who is doing what and in which phase of development things are, this information could avoid duplicated efforts.

HT has been supported for years, so its development hasn't overlapped with your own work. The existing support isn't very HT aware though. For example, the schedulers treat HT pairs just the same as two separate physical processors, so there may be more performance to be had by making Xen a bit smarter.

-- Keir

#5 lore raw

Hi Keir,

Thanks for the answer.

Possibly I used an out of date Xen-3.0.testing source code.

What I meant by HT support was the construction of sibling maps by the
Guest OS smp-kernel using information about the core ids from the VCPU.

	More precisely, I've found the following comment in the file:

	./linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c

	 /* Currently, Xen gives no dynamic NUMA/HT info. */

	Thus, I modified this file and a couple of other to allow the guest os

kernel to build the siblings map properly.

Regards,
Eli

Quoted 19 lines · Keir Fraser
Quoted 7 lines · Elizeu Santos-Neto

Well, based on some quick inspections on the that I checked out from
the mercurial repository this afternoon, it seems that the HT support has been already implemented. :-)

Thus, here is a suggestion, it would be nice to make more details
available about who is doing what and in which phase of development things are, this information could avoid duplicated efforts.

HT has been supported for years, so its development hasn't overlapped with your own work. The existing support isn't very HT aware though. For example, the schedulers treat HT pairs just the same as two separate physical processors, so there may be more performance to be had by making Xen a bit smarter.

-- Keir

#6 lore raw
Quoted 11 lines · Elizeu Santos-Neto

What I meant by HT support was the construction of sibling maps by the
Guest OS smp-kernel using information about the core ids from the VCPU.

	More precisely, I've found the following comment in the file:

	./linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c

	 /* Currently, Xen gives no dynamic NUMA/HT info. */

	Thus, I modified this file and a couple of other to allow the guest os

kernel to build the siblings map properly.

Ah, I see. Those platform files (e.g., smpboot.c, mpparse.c. ,,,) are all kept in sync with linux-2.6 codebase. We generally don't modify them much for Xen and periodically (every couple of months) I pull in the latest versions from linux. That's what's happened here.

-- Keir