From: Lucas Meneghel Rodrigues Subject: Re: [PATCH] [RFC]: Make some aspects of client behavior configurable Date: Thu, 05 Nov 2009 17:44:32 -0200 Message-ID: <1257450272.2774.343.camel@localhost.localdomain> References: <1257354712-5724-1-git-send-email-lmr@redhat.com> <394b34480911050901l30b7dc7cqa06a0dc1ae012411@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, kvm@vger.kernel.org To: John Admanski Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62421 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758144AbZKETod (ORCPT ); Thu, 5 Nov 2009 14:44:33 -0500 In-Reply-To: <394b34480911050901l30b7dc7cqa06a0dc1ae012411@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2009-11-05 at 09:01 -0800, John Admanski wrote: > Well, the drop_caches configs I definitely like. As a general rule I > think it's reasonable to translate most global defaults into a global > config setting. Ok, great, so 'drop_caches' will be kept as is. > > The sysinfo changes I'm a little less certain about. I do like the > idea of the sysinfo being more configurable in a way that doesn't > require making code changes, it's just that your proposed change just > targets one specific piece of sysinfo collection, and then wraps some > if blocks around it; I wish we could do something a little more > general. > > > I'm just picturing something more along the lines of breaking the > existing collection up into multiple functions (or classes) and then > letting you control which classes/functions actually get run with the > global config. Right now we just pile everything into one big class so > the only way to customize it at config time is to add a bunch of ifs, > like in your patch. It's not so bad for just enabling/disabling one > thing, but if the intention is to add more switches in the future it > doesn't really scale. Absolutely, I agree with you. I've spin this quick patch and put it as an RFC more to get some discussion about the subject. I am going to separate the drop_caches thing on its own patch (so it can be incorporated quickly) and will work on the sysinfo stuff, taking a more general approach. Thanks for your insight on this! Lucas