public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@linux.intel.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Samu Onkalo <samu.p.onkalo@nokia.com>,
	gregkh@suse.de, hmh@hmh.eng.br, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] device-core: sysfs open - close notify
Date: Mon, 1 Nov 2010 17:11:26 +0000	[thread overview]
Message-ID: <20101101171126.1194e2b0@linux.intel.com> (raw)
In-Reply-To: <AANLkTikRSF-4o=Jnyg2_Wa4gg7E+s_tM9ZD3g+f7hyWm@mail.gmail.com>

> Your patch may cause many unnecessary memory waste because
> most of drivers does not need attribute file .open/.close notifier.

Firstly there are not that many driver objects in a small system so it
wouldn't take that much to shift the balance the other way. Secondly
its becoming clear that every time a driver goes to runtime pm these
issues come up - even with things like configuration values for drivers
that need to wake the hardware and then silence it.

So the whole sysfs/open thing is going to keep haunting us with runtime
pm, the question is where to put the callbacks so we don't bloat stuff.
Clearly not per attribute or per sysfs node. One possibility would be
with the runtime pm stuff, but that would need a clean reliable way to
go sysfs->device->runtime_pm

There are also obvious hackish ways to handle it like passing a 0
length read to indicate close etc - they save memory but they are
asking for problems in future.


  reply	other threads:[~2010-11-01 18:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31 12:46 [RFC PATCH] device-core: sysfs open - close notify Samu Onkalo
2010-10-31 16:14 ` Ming Lei
2010-11-01 17:11   ` Alan Cox [this message]
2010-11-02  6:30     ` Onkalo Samu
2010-11-16  3:14       ` Enrico Weigelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101101171126.1194e2b0@linux.intel.com \
    --to=alan@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=hmh@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samu.p.onkalo@nokia.com \
    --cc=tom.leiming@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox