From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751097AbbGaEf1 (ORCPT ); Fri, 31 Jul 2015 00:35:27 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:35338 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750918AbbGaEf0 (ORCPT ); Fri, 31 Jul 2015 00:35:26 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Fri, 31 Jul 2015 00:42:06 -0400 (EDT) To: Peter Zijlstra cc: Ingo Molnar , linux-kernel@vger.kernel.org, eranian@google.com, Paul Mackerras , Arnaldo Carvalho de Melo Subject: Re: [patch] inherited events not signalling parent on overflow In-Reply-To: <1434011521.1495.71.camel@twins> Message-ID: References: <20150529063650.GA22568@gmail.com> <1434011521.1495.71.camel@twins> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 11 Jun 2015, Peter Zijlstra wrote: > Right, I had a peek earlier at how fasync worked but came away confused. > > Today I seem to have had better luck. Installing fasync allocates memory > and sets filp->f_flags |= FASYNC, which upon the demise of the file > descriptor ensures the allocation is freed. > > Now for perf, we can have the events stick around for a while after the > original FD is dead because of references from child events. With the > above patch these events would still have a pointer into this free'd > fasync. This is bad. > > A further problem with the patch is that if the parent changes its > fasync state the children might lag and again have pointers into dead > space. > > All is not lost though; does something like the below work? I had meant to reply to this earlier but maybe I forgot. I've been running with this patch for a month now and haven't had problems, and it fixes the issue of inherited signals. So it no one else has issues with the patch it would be nice if it could be pushed upstream. Thanks, Vince