On 04/24/2013 12:24 AM, Anton Vorontsov wrote: > Setting the variable on every event seems a bit wasteful... does it make > sense to set it in vmpressure_register_event()? We'll have to make it a > counter, but the good thing is that we won't need any additional locks for > the counter. My bad, I was not looking at the code. There are two variables here: One of them is an event variable: kernel_event. It is set to true upon registration when we are registering a kernel event. We use it to decide whether we should call a function or signal eventfd for that event. The other, is a vmpr event and should indeed, be set in all pressure isntances. It tells us if we should only trigger kernel events (if false), or userspace events as well (if true). This is because, for instance, userspace events may not always be triggered (for instance, due to flags mismatch) -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html