Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp922758ybi; Wed, 19 Jun 2019 10:08:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXDqYvR3RKpzNPOtYpeYlvXlwR8gdbE7R6FyogobG4xJflq+GuPn2aA8/p2Gcazuv4jckv X-Received: by 2002:a63:ce08:: with SMTP id y8mr8466471pgf.38.1560964099873; Wed, 19 Jun 2019 10:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560964099; cv=none; d=google.com; s=arc-20160816; b=iLIg+V4pGUFNRPBmnWwuOsKCWvYgqYuKWnEduwPdj0+k1e3ezzdSGow2JcXAMTlSqP 7LZOYUyey0FvyCU19c5VzcCwBM+8mju7Tx0Dm+RDTbvdHVj3MHLuS4CxMAauQUx9DpT9 tdoeTLRV4m0GVIKrtBHoerfDowFhA1VYev632Tjv/OJVKlRMIzJgrpp49Ds9NPvPAqhl Lx6htf93Y2mSqqkfSa4AG2aix37206X8P137Yb5cNCR4zwkiwQB13PZUQGzQnGPR1DJQ BHGF6W6fKJlBZSqzsvBhIwtYWnVqpFLd74ppbuTKMx5Yvqncb+aR/LlyW29qBhd46D90 ED/Q== 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=xTAjSrgcwtLOEhces3y5RpET74LpQpFxWeu1AAl4SQw=; b=w/AQChgZLaILYzfHqd7xnKbzeYMHyJpqg1BUidp1vp+KDOMcE463nBKus3EWukEpFI QU4jZ+sYhKex+S3q/B5jklvaxzWxGYGU2uVtqYWWw0pW5dnWYinKEfbdOpFtgRtPBxIu 97HygqVF5RKKA2a2/1PScco+zdB53oSSguX4QWc6CosRy3LtbTWPtx0Cx4IFv3V3kGDr B4eOMg5meW1O4OukRIFVkuN3IfG6HJV2SXzSq0zvuAWlQZCYRazv9bM+/SoU6zbiXzYM W8qXReb4ZeE603TgxwXUeJkpSugdrcvN0N+41dTyFBd8cAF+JGtZO6kDAx+9JXC2j4bs BsBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BO2NJ4gV; 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 w17si17996430pfj.69.2019.06.19.10.08.04; Wed, 19 Jun 2019 10:08:19 -0700 (PDT) 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=BO2NJ4gV; 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 S1729142AbfFSRHy (ORCPT + 99 others); Wed, 19 Jun 2019 13:07:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:54222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726322AbfFSRHy (ORCPT ); Wed, 19 Jun 2019 13:07:54 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 5FCC52084E; Wed, 19 Jun 2019 17:07:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560964072; bh=ZZakWFV3wpQ3D41JL/BfSJA1Zh1XLt3/4zsXV7Va1Hs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BO2NJ4gV8/ZsImJxX7Kk/YMxssdJZkjdLTLCVGdqLXU4vhIj/NJAO/8y4Eivd5AqX YLZB76XuHz/XXqNCjp3q+0pdlwmm02Pxb05DPimNT+IgAhAqibfVh676U2FVshVfmP gb4eKSQRJFqL34YdwjihtWah3/tBogVaYlzLUpC4= Date: Wed, 19 Jun 2019 19:07:50 +0200 From: Greg Kroah-Hartman To: Joel Fernandes Cc: "Rafael J. Wysocki" , Tri Vo , "Rafael J. Wysocki" , Sandeep Patil , Viresh Kumar , Hridya Valsaraju , Linux PM , "Cc: Android Kernel" , LKML , Alexei Starovoitov , Steven Rostedt , Alexei Starovoitov Subject: Re: Alternatives to /sys/kernel/debug/wakeup_sources Message-ID: <20190619170750.GB10107@kroah.com> References: <20190618182502.GC203031@google.com> <4587569.x9DSL43cXO@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 19, 2019 at 12:53:12PM -0400, Joel Fernandes wrote: > > It is conceivable to have a "wakeup_sources" directory under > > /sys/power/ and sysfs nodes for all wakeup sources in there. > > One of the "issues" with this is, now if you have say 100 wake up > sources, with 10 entries each, then we're talking about a 1000 sysfs > files. Each one has to be opened, and read individually. This adds > overhead and it is more convenient to read from a single file. The > problem is this single file is not ABI. So the question I guess is, > how do we solve this in both an ABI friendly way while keeping the > overhead low. How much overhead? Have you measured it, reading from virtual files is fast :) And how often does this happen? Does it _need_ to happen? Parsing files is also hard, and not for sysfs files, you can't have it both ways. So try it this way, and if there really is a performance issue, we can then talk about it... thanks, greg k-h