Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753877Ab2ECH57 (ORCPT ); Thu, 3 May 2012 03:57:59 -0400 Received: from LGEMRELSE7Q.lge.com ([156.147.1.151]:46717 "EHLO LGEMRELSE7Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752643Ab2ECH56 (ORCPT ); Thu, 3 May 2012 03:57:58 -0400 X-AuditID: 9c930197-b7badae000000cfd-40-4fa23a8251c4 Message-ID: <4FA23A83.4040604@kernel.org> Date: Thu, 03 May 2012 16:57:55 +0900 From: Minchan Kim User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: gmane.linux.kernel.mm,gmane.linux.kernel To: Pekka Enberg CC: linux-mm@kvack.org, LKML , Ingo Molnar , Anton Vorontsov , Leonid Moiseichuk Subject: Re: vmevent: question? References: <4F9E39F1.5030600@kernel.org> <4F9E44AD.8020701@kernel.org> <4F9E4F0A.8030900@kernel.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2196 Lines: 57 On 05/03/2012 04:24 PM, Pekka Enberg wrote: > On Mon, 30 Apr 2012, Minchan Kim wrote: >>> What kind of consistency guarantees do you mean? The data sent to >>> userspace is always a snapshot of the state and therefore can be stale >>> by the time it reaches userspace. >> >> Consistency between component of snapshot. >> let's assume following as >> >> 1. User expect some events's value would be minus when event he expect happen. >> A : -3, B : -4, C : -5, D : -6 >> 2. Logically, it's not possible to mix plus and minus values for the events. >> A : -3, B : -4, C : -5, D : -6 ( O ) >> A : -3, B : -4, C : 1, D : 2 ( X ) >> >> But in current implementation, some of those could be minus and some of those could be plus. >> Which event could user believe? >> At least, we need a _captured_ value when event triggered so that user can ignore other values. > > Sorry, I still don't quite understand the problem. Sorry for my poor explanation. My point is when userspace get vmevent_event by reading fd, it could enumerate several attribute all at once. Then, one of attribute(call A) made by vmevent_match in kernel and other attributes(call B, C, D) are just extra for convenience. Because there is time gap when kernel get attribute values, B,C,D could be stale. Then, how can user determine which event is really triggered? A or B or C or D? Which event really happens? > > The current implementation provides the same kind of snapshot consistency > as reading from /proc/vmstat does (modulo the fact that we read them > twice) for the values we support. > > Pekka > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ > Don't email: email@kvack.org > -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/