Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753978Ab0GIHFD (ORCPT ); Fri, 9 Jul 2010 03:05:03 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:55750 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333Ab0GIHFA convert rfc822-to-8bit (ORCPT ); Fri, 9 Jul 2010 03:05:00 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=yFACyay+uMtnWWIQuRAFyge8pcJjyocYL+GdSRjcoy4oV3bMVGUKMCcT0mZJS10FbA rKoK0KEONigYEBB10TBjBEAXOTR0v06yvv6h5gbcMHF7lkECWwf3VAlI7iJTN3GIhRZl a0C6XH3kdcezlKg7pCWddGZ9/UCuUXQKm7BfQ= MIME-Version: 1.0 In-Reply-To: <20100708224837.6a18995b@infradead.org> References: <20100708224837.6a18995b@infradead.org> Date: Fri, 9 Jul 2010 15:04:59 +0800 Message-ID: Subject: Re: [PATCH] pm: Add runtime PM statistics to sysfs From: Ming Lei To: Arjan van de Ven Cc: "Rafael J. Wysocki" , linux-pm@lists.linux-foundation.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 27 2010/7/9 Arjan van de Ven : > From: Arjan van de Ven > diff --git a/include/linux/pm.h b/include/linux/pm.h > index 8e258c7..dca597f 100644 > --- a/include/linux/pm.h > +++ b/include/linux/pm.h > @@ -476,9 +476,15 @@ struct dev_pm_info { > ? ? ? ?enum rpm_request ? ? ? ?request; > ? ? ? ?enum rpm_status ? ? ? ? runtime_status; > ? ? ? ?int ? ? ? ? ? ? ? ? ? ? runtime_error; > + ? ? ? unsigned long ? ? ? ? ? active_jiffies; > + ? ? ? unsigned long ? ? ? ? ? suspended_jiffies; > + ? ? ? unsigned long ? ? ? ? ? accounting_timestamp; > ?#endif > ?}; USB subsystem has implemented the function already, and only two variables are enough to do the statistics. Suggest you to make a reference to usb implementation, maybe sizeof(unsigned long) bytes per device can be saved. -- Lei Ming -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/