Date: Sat, 29 Dec 2007 18:01:43 -0600 (CST) From: Mike Silbersack <silby@silby.com> To: Robert Watson <rwatson@FreeBSD.org> Cc: current@freebsd.org Subject: Re: [patch] Auto-setting hz to 100 inside QEMU/VMWare Message-ID: <20071229180004.O6052@odysseus.silby.com> In-Reply-To: <20071228095539.F45653@fledge.watson.org> References: <20071228015651.X1565@odysseus.silby.com> <20071228095539.F45653@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1861302967-2103615001-1198972903=:6052 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Fri, 28 Dec 2007, Robert Watson wrote: > I like the general idea, but one thing that does worry me is that this > prevents me from using config to set HZ at all, I have to set it at runtime > using the tunable. Could we add an: Attached is a patch which attempts to address all of Robert's concerns and includes all the strings for the various VMs that people have mailed in to me. Please test/review. :) Mike "Silby" Silbersack --1861302967-2103615001-1198972903=:6052 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=virtual_hz-3.patch Content-Transfer-Encoding: BASE64 Content-ID: <20071229180143.F6052@odysseus.silby.com> Content-Description: Content-Disposition: attachment; filename=virtual_hz-3.patch ZGlmZiAtdSAtciAvdXNyL3NyYy9zeXMub2xkL2FtZDY0L2FtZDY0L21hY2hk ZXAuYyAvdXNyL3NyYy9zeXMvYW1kNjQvYW1kNjQvbWFjaGRlcC5jDQotLS0g L3Vzci9zcmMvc3lzLm9sZC9hbWQ2NC9hbWQ2NC9tYWNoZGVwLmMJMjAwNy0x Mi0yOSAwMzowMTowMi4wMDAwMDAwMDAgLTA2MDANCisrKyAvdXNyL3NyYy9z eXMvYW1kNjQvYW1kNjQvbWFjaGRlcC5jCTIwMDctMTItMjkgMTg6NTc6MDEu MDAwMDAwMDAwIC0wNjAwDQpAQCAtMTkzNSwzICsxOTM1LDMzIEBADQogfQ0K IA0KICNlbmRpZiAvKiBLREIgKi8NCisNCisvKiBrZW52IHN0cmluZ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zL3N5 cy9zeXN0bS5oDQotLS0gL3Vzci9zcmMvc3lzLm9sZC9zeXMvc3lzdG0uaAky MDA3LTEyLTI5IDAzOjAxOjM1LjAwMDAwMDAwMCAtMDYwMA0KKysrIC91c3Iv c3JjL3N5cy9zeXMvc3lzdG0uaAkyMDA3LTEyLTI5IDAzOjUwOjU5LjAwMDAw MDAwMCAtMDYwMA0KQEAgLTI0NSw2ICsyNDUsOCBAQA0KIGludAl1bnNldGVu dihjb25zdCBjaGFyICpuYW1lKTsNCiBpbnQJdGVzdGVudihjb25zdCBjaGFy ICpuYW1lKTsNCiANCitpbnQJZGV0ZWN0X3ZpcnR1YWxtYWNoaW5lKHZvaWQp Ow0KKw0KIHR5cGVkZWYgdWludDY0X3QgKGNwdV90aWNrX2YpKHZvaWQpOw0K IHZvaWQgc2V0X2NwdXRpY2tlcihjcHVfdGlja19mICpmdW5jLCB1aW50NjRf dCBmcmVxLCB1bnNpZ25lZCB2YXIpOw0KIGV4dGVybiBjcHVfdGlja19mICpj cHVfdGlja3M7DQo= --1861302967-2103615001-1198972903=:6052--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071229180004.O6052>