From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx188.postini.com [74.125.245.188]) by kanga.kvack.org (Postfix) with SMTP id 2F2216B004D for ; Thu, 3 May 2012 04:14:12 -0400 (EDT) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SPrAv-00010C-3c for linux-mm@kvack.org; Thu, 03 May 2012 10:14:09 +0200 Received: from 121.50.20.41 ([121.50.20.41]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 May 2012 10:14:08 +0200 Received: from minchan by 121.50.20.41 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 May 2012 10:14:08 +0200 From: Minchan Kim Subject: Re: vmevent: question? Date: Thu, 03 May 2012 17:13:59 +0900 Message-ID: <4FA23E47.6040303@kernel.org> References: <4F9E39F1.5030600@kernel.org> <4F9E44AD.8020701@kernel.org> <4F9E4F0A.8030900@kernel.org> <4FA23A83.4040604@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org On 05/03/2012 05:07 PM, Pekka Enberg wrote: > On Thu, May 3, 2012 at 10:57 AM, Minchan Kim wrote: >> 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? > > Right. Mark the matching values with something like > VMEVENT_ATTR_STATE_CAPTURED should be sufficient? Seems to be good and we have to notice to user by document "Except VMEVENT_ATTR_STATE_CAPTURED, all attributes's value could be stale. So, don't be deceived. Please ignore if you need" First of all, let make CAPTURED state could be exact. ----- > Q 2. Is it okay although value when vmevent_match check happens is different with > vmevent_sample_attr in vmevent_sample's for loop? > I think it's not good. Yeah, that's just silly and needs fixing. ----- > > -- > 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, 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