Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp996585imu; Tue, 20 Nov 2018 09:59:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/XCX0f/FTAvNKibdZTAgu0z6DyGnl4+5D4VosUSbTg0CoVpukaxwIrsEtRGY2hZu+T56LZO X-Received: by 2002:a63:a112:: with SMTP id b18mr2813548pgf.440.1542736763555; Tue, 20 Nov 2018 09:59:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542736763; cv=none; d=google.com; s=arc-20160816; b=A7A9vwwoX1xEZGnknyZDKz/wDGcGOSNr62OpAzXkBcE+bXBZjMM8tmj19l2brSJvQo Tto8Vt4qqvu3hvmY2VzN1t0pQJZ5H2R+4gsBjlWM036rUUsx+nHrJXHpbb0HgI/Uqkdg 8pmALQK3ZKaPYtvnmw1UGmGOsiUZt2j5u4AMnyLnNYZ3tbBK8dig8WqpIOxbZhVHKKSZ QiWhNiZ9TLLScpsTbuS7FlfnCgwN0+tI4U+SYc7TuuaLbQpd1pYvUJYja9Mm4n4rgs47 wHsBNOdQ5n9V9wR0Lum7lh/VfkUn2yIcA1SZJrKD60109esqkqlhjhdFHxkpWWoL0+Vn qyhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+/S9cX33jhECRCX+riw/Dgm+1EF0q7ZpU7+kUcYD4Jk=; b=j1tNynedQLZ+R4Cn/6ekfkmzq5QecrUD682JkGMYaMAHyBBvaZp6uoy9j5gjE1XWjS 9dQTC7PcGCZMbacPJuFhwFT3FwI1AcNiF6vFIYuowsLZ3AQ4Y/GKLdjBo+IHixcvNoF0 AI9w6BYHpgCkwi97cX3YmPWAdMeYcTB8mL+AFRw1gIuAydyZXbPAhILYBNedKahHwGx4 Cd4vsEu+14s4eO5QGUvokm2fBCeT8IcUY7QdjUS/8iKVbEmJ2J9l8LTMHa+FbdV5MHT2 4+y3QGFiMgzXUsOSreZ4K5e60N1cuAMyooynUnKMNb9A70TBVGgHqHlPRki0RlZ0VO05 HU2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uwVxtBUX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si16374603plk.61.2018.11.20.09.59.08; Tue, 20 Nov 2018 09:59:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uwVxtBUX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730407AbeKUD2x (ORCPT + 99 others); Tue, 20 Nov 2018 22:28:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:45278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730398AbeKUD2w (ORCPT ); Tue, 20 Nov 2018 22:28:52 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBE2720831; Tue, 20 Nov 2018 16:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542733125; bh=0fY4+Pq/ps3B+xEtxzaTUZB1dmaa40kSDRXk2cI3+R0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uwVxtBUXmYx44D+9oRYMaRL8eYYLO5oLqkF1gIXYyrPK1k5YfkUOdkVLeE96/xTpF /ZCPdYrE0f9kAK3UX2bs+6wlpL4RGCi+sOxxoRQcSnqjZeIUSAs8jhK8tLM3sTZ9No raHd8HdOnRndTDQZunV5oKz30nY4n8A51UOAvyn4= Date: Tue, 20 Nov 2018 17:58:42 +0100 From: Greg Kroah-Hartman To: Tejun Heo Cc: Radu Rendec , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] Improve kernfs_notify() poll notification latency Message-ID: <20181120165842.GB28793@kroah.com> References: <20181116020954.24924-1-radu.rendec@gmail.com> <20181116020954.24924-2-radu.rendec@gmail.com> <20181120161419.GS2509588@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181120161419.GS2509588@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 20, 2018 at 08:14:19AM -0800, Tejun Heo wrote: > On Thu, Nov 15, 2018 at 09:09:54PM -0500, Radu Rendec wrote: > > kernfs_notify() does two notifications: poll and fsnotify. Originally, > > both notifications were done from scheduled work context and all that > > kernfs_notify() did was schedule the work. > > > > This patch simply moves the poll notification from the scheduled work > > handler to kernfs_notify(). The fsnotify notification still needs to be > > done from scheduled work context because it can sleep (it needs to lock > > a mutex). > > > > If the poll notification is time critical (the notified thread needs to > > wake as quickly as possible), it's better to do it from kernfs_notify() > > directly. One example is calling sysfs_notify_dirent() from a hardware > > interrupt handler to wake up a thread and handle the interrupt in user > > space. > > > > Signed-off-by: Radu Rendec > > Acked-by: Tejun Heo > > Greg, can you please route this one? Sure, I'll queue it up soon... greg k-h