Re: [F.A.Q.] the advantages of a shared tool/kernel Git repository, tools/perf/ and tools/kvm/
On Tue, Nov 8, 2011 at 5:32 PM, Ingo Molnar mi...@elte.hu wrote: So i think you should seriously consider moving your projects *into* tools/ instead of trying to get other projects to move out ... You should at least *try* the unified model before criticising it - because currently you guys are preaching about sex while having sworn a life long celibacy ;-) Ingo, this is making Linux another BSD... manage everything in a single tree... Also, what is your criteria for merging a user-space project into kernel tree? Thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] KVM: Add wrapper script around Qemu to test kernels
On Thu, Aug 25, 2011 at 4:35 AM, Alexander Graf ag...@suse.de wrote: On 24.08.2011, at 00:31, Américo Wang wrote: On Wed, Aug 24, 2011 at 1:19 PM, Pekka Enberg penb...@kernel.org wrote: It's nice to see such an honest attempt at improving QEMU usability, Alexander! One comment: in my experience, having shell scripts under Documentation reduces the likelihood that people actually discover them so you might want to consider putting it under scripts or tools. I was going to give the same suggestion, +1 for tools/ directory. Well, scripts/ is a flat directory where I can just throw in the script. Tools however is split by tool and creating a full new directory for only a single script sounds a bit like overkill to me. I'll move it to scripts/ for now :) How about the directory tools/testing/ ? scripts/ is mainly for the tools/utilities we use to build kernel or do kernel dev, it is not so suitable for your script IMHO. Thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] KVM: Add wrapper script around Qemu to test kernels
On Wed, Aug 24, 2011 at 1:19 PM, Pekka Enberg penb...@kernel.org wrote: It's nice to see such an honest attempt at improving QEMU usability, Alexander! One comment: in my experience, having shell scripts under Documentation reduces the likelihood that people actually discover them so you might want to consider putting it under scripts or tools. I was going to give the same suggestion, +1 for tools/ directory. Thanks! -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.33.3: possible recursive locking detected
On Wed, May 5, 2010 at 10:32 AM, Yong Zhang yong.zh...@windriver.com wrote: On Tue, May 04, 2010 at 11:37:37AM +0300, Avi Kivity wrote: On 05/04/2010 10:03 AM, CaT wrote: I'm currently running 2.6.33.3 in a KVM instance emulating a core2duo on 1 cpu with virtio HDs running on top of a core2duo host running 2.6.33.3. qemu-kvm version 0.12.3. Can you try commit 6992f5334995af474c2b58d010d08bc597f0f2fe in the latest kernel? Hmm, 2.6.33 -stable has commit 846f99749ab68bbc7f75c74fec305de675b1a1bf? Actually, these 3 commits fixed it: 6992f5334995af474c2b58d010d08bc597f0f2fe sysfs: Use one lockdep class per sysfs ttribute. a2db6842873c8e5a70652f278d469128cb52db70 sysfs: Only take active references on attributes. e72ceb8ccac5f770b3e696e09bb673dca7024b20 sysfs: Remove sysfs_get/put_active_two However, there are many other patches needed to amend these, so I think it's not suitable for -stable to include, perhaps a revert of 846f99749ab68bbc7f75c74fec305de675b1a1bf is better. Adding Greg into Cc. Thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] BUILD_BUG_ON: make it handle more cases
On Tue, Oct 20, 2009 at 10:43 PM, Alan Jenkins sourcejedi.l...@googlemail.com wrote: On 10/20/09, Américo Wang xiyou.wangc...@gmail.com wrote: On Tue, Oct 20, 2009 at 02:15:33PM +1030, Rusty Russell wrote: BUILD_BUG_ON used to use the optimizer to do code elimination or fail at link time; it was changed to first the size of a negative array (a nicer compile time error), then (in 8c87df457cb58fe75b9b893007917cf8095660a0) to a bitfield. bitfields: needs a literal constant at parse time, and can't be put under if (__builtin_constant_p(x)) for example. negative array: can handle anything, but if the compiler can't tell it's a constant, silently has no effect. link time: breaks link if the compiler can't determine the value, but the linker output is not usually as informative as a compiler error. If we use the negative-array-size method *and* the link time trick, we get the ability to use BUILD_BUG_ON() under __builtin_constant_p() branches, and maximal ability for the compiler to detect errors at build time. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/include/linux/kernel.h b/include/linux/kernel.h --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -683,12 +683,6 @@ struct sysinfo { char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ }; -/* Force a compilation error if condition is true */ -#define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition)) - -/* Force a compilation error if condition is constant and true */ -#define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) - /* Force a compilation error if condition is true, but also produce a result (of value 0 and type size_t), so the expression can be used e.g. in a structure initializer (or where-ever else comma expressions @@ -696,6 +690,33 @@ struct sysinfo { #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) +/** + * BUILD_BUG_ON - break compile if a condition is true. + * @cond: the condition which the compiler should know is false. + * + * If you have some code which relies on certain constants being equal, or + * other compile-time-evaluated condition, you should use BUILD_BUG_ON to + * detect if someone changes it. + * + * The implementation uses gcc's reluctance to create a negative array, but + * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments + * to inline functions). So as a fallback we use the optimizer; if it can't + * prove the condition is false, it will cause a link error on the undefined + * __build_bug_on_failed. This error message can be harder to track down + * though, hence the two different methods. + */ +#ifndef __OPTIMIZE__ +#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) +#else +extern int __build_bug_on_failed; Hmm, what exactly is __build_bug_on_failed? Well, we haven't added a definition for it in this patch. I'm sure grep will tell you it wasn't defined before hand either. So any reference to it is an error - which will be reported at link time. +#define BUILD_BUG_ON(condition) \ + do { \ + ((void)sizeof(char[1 - 2*!!(condition)])); \ + if (condition) __build_bug_on_failed = 1; \ If condition is known false at compile time, gcc -O will eliminate the code which refers to __build_bug_on_failed. If it's not proved to be false - it will break the build, which is exactly what we want BUILD_BUG_ON to do. Ah, clever trick! Got it. Thanks! Reviewed-by: WANG Cong xiyou.wangc...@gmail.com -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html