All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Jeff Angielski <jeff@theptrgroup.com>
Cc: lm-sensors <lm-sensors@lm-sensors.org>,
	Linuxppc-dev@lists.ozlabs.org,
	Andre Prendel <andre.prendel@gmx.de>
Subject: Re: [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support.
Date: Wed, 12 May 2010 07:27:15 +0000	[thread overview]
Message-ID: <20100512092715.12639dcf@hyperion.delvare> (raw)
In-Reply-To: <4BE9B145.7000702@theptrgroup.com>

Hi Jeff,

On Tue, 11 May 2010 15:34:29 -0400, Jeff Angielski wrote:
> On 05/11/2010 03:03 PM, Andre Prendel wrote:
> > I'de prefer implementing the sysfs access methods in a consistent way (see other functions). That means adding the nfactor register to the tmp421_data structure and using tmp421_update_device() to update the structure.
> 
> I did this on purpose since the nfactor typically only changes once at 
> runtime when you program it for your sensor.  It seemed like a waste of 
> processing power and i2c bandwidth to read a "pseudo static" register 
> over and over again.
> 
> It can easily be changed if that's what will help the community the best.

I get your point and it makes sense. However, we also have to ensure
that no regular user can saturate the I2C link by repeatedly polling
for the same register value. So, any sysfs attribute which triggers an
immediate I2C transaction shouldn't be accessible by regular users
(i.e. change the mode from 0644 to 0640).

An alternative is to slit the cache into short-lived (~ 1 or 2 seconds)
and long-lived (1 to 5 minutes.) A number of drivers do this.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: Jeff Angielski <jeff@theptrgroup.com>
Cc: lm-sensors <lm-sensors@lm-sensors.org>,
	Linuxppc-dev@lists.ozlabs.org,
	Andre Prendel <andre.prendel@gmx.de>
Subject: Re: [PATCH] hwmon: (tmp421) Add nfactor support.
Date: Wed, 12 May 2010 09:27:15 +0200	[thread overview]
Message-ID: <20100512092715.12639dcf@hyperion.delvare> (raw)
In-Reply-To: <4BE9B145.7000702@theptrgroup.com>

Hi Jeff,

On Tue, 11 May 2010 15:34:29 -0400, Jeff Angielski wrote:
> On 05/11/2010 03:03 PM, Andre Prendel wrote:
> > I'de prefer implementing the sysfs access methods in a consistent way (see other functions). That means adding the nfactor register to the tmp421_data structure and using tmp421_update_device() to update the structure.
> 
> I did this on purpose since the nfactor typically only changes once at 
> runtime when you program it for your sensor.  It seemed like a waste of 
> processing power and i2c bandwidth to read a "pseudo static" register 
> over and over again.
> 
> It can easily be changed if that's what will help the community the best.

I get your point and it makes sense. However, we also have to ensure
that no regular user can saturate the I2C link by repeatedly polling
for the same register value. So, any sysfs attribute which triggers an
immediate I2C transaction shouldn't be accessible by regular users
(i.e. change the mode from 0644 to 0640).

An alternative is to slit the cache into short-lived (~ 1 or 2 seconds)
and long-lived (1 to 5 minutes.) A number of drivers do this.

-- 
Jean Delvare

  reply	other threads:[~2010-05-12  7:27 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10 14:43 [PATCH] hwmon: (tmp421) Add nfactor support Jeff Angielski
2010-05-11 19:03 ` [lm-sensors] " Andre Prendel
2010-05-11 19:03   ` Andre Prendel
2010-05-11 19:12   ` [lm-sensors] " Jean Delvare
2010-05-11 19:12     ` Jean Delvare
2010-05-11 19:34   ` [lm-sensors] " Jeff Angielski
2010-05-11 19:34     ` Jeff Angielski
2010-05-12  7:27     ` Jean Delvare [this message]
2010-05-12  7:27       ` Jean Delvare
2010-05-17 20:30   ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Jeff Angielski
2010-05-17 20:30     ` [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Jeff Angielski
2010-05-18 11:38     ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Andre Prendel
2010-05-18 11:38       ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Andre Prendel
2010-05-18 14:35       ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Jeff Angielski
2010-05-18 14:35         ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Jeff Angielski
2010-05-19  7:26         ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Andre Prendel
2010-05-19  7:26           ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Andre Prendel
2010-05-19 13:16           ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Jean Delvare
2010-05-19 13:16             ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Jean Delvare
2010-05-19 17:13           ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Jeff Angielski
2010-05-19 17:13             ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Jeff Angielski
2010-05-20 18:50             ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Andre Prendel
2010-05-20 18:50               ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Andre Prendel
2010-05-20 19:07               ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Jeff Angielski
2010-05-20 19:07                 ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Jeff Angielski
2010-05-20 19:35                 ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Andre Prendel
2010-05-20 19:35                   ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Andre Prendel
2010-06-18 14:53                   ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Andre Prendel
2010-06-18 14:53                     ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Andre Prendel
2010-07-20 15:09                   ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Andre Prendel
2010-07-20 15:09                     ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Andre Prendel
2010-07-20 15:59   ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Guenter Roeck
2010-07-21 19:46     ` Andre Prendel
2010-07-21 19:46       ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Andre Prendel
2010-08-14 19:15       ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd Jean Delvare
2010-08-14 19:15         ` [lm-sensors] [PATCH] hwmon: (tmp421) Add nfactor support (2nd attempt) Jean Delvare

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=20100512092715.12639dcf@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=Linuxppc-dev@lists.ozlabs.org \
    --cc=andre.prendel@gmx.de \
    --cc=jeff@theptrgroup.com \
    --cc=lm-sensors@lm-sensors.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.