From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752443AbdHDRaz (ORCPT ); Fri, 4 Aug 2017 13:30:55 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41275 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751930AbdHDRay (ORCPT ); Fri, 4 Aug 2017 13:30:54 -0400 Date: Fri, 4 Aug 2017 23:00:44 +0530 From: "Naveen N. Rao" To: Peter Zijlstra Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Ingo Molnar , Vince Weaver , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] kernel/events: Add option to notify through signals on wakeup References: <20170804102018.u2zvnekjpjqdag7c@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170804102018.u2zvnekjpjqdag7c@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170714 (1.8.3) X-TM-AS-MML: disable x-cbid: 17080417-0012-0000-0000-0000025883FF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17080417-0013-0000-0000-0000077324DD Message-Id: <20170804173044.3mqwtt3ge73n6of5@naverao1-tp.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-04_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1708040270 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 2017/08/04 12:20PM, Peter Zijlstra wrote: > On Tue, Aug 01, 2017 at 08:14:03PM +0530, Naveen N. Rao wrote: > > Add a new option 'signal_on_wakeup' to request for a signal to be > > delivered on ring buffer wakeup controlled through watermark and > > {wakeup_events, wakeup_watermark}. HUP is signaled on exit. > > This fails to tell us why you'd want this. What is wrong with the > existing POLL_IN notification? Yes, sorry - I should have included some of the explanation from the cover letter as part of this patch description. The primary use-case is for self-profiling. If a process wants to profile itself and wishes to receive notification via signals, we do not have any control over when we can receive such notifications -- a POLL_IN is generated on each overflow. We may just want to be notified every n events, rather than on each event. Furthermore, some side band events are useful by themself and it will be desirable to be notified on those events. This again is not possible today with IOC_ENABLE/IOC_REFRESH (addressed with Patch 2/2 in this series). Regards, Naveen