lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 23 Feb 2024 16:40:18 +0800
From: Hermes Zhang <chenhuiz@...s.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>,
 Hermes Zhang <Hermes.Zhang@...s.com>
Cc: kernel@...s.com, Pali Rohár <pali@...nel.org>,
 linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: supply: bq27xxx: Introduce parameter to config
 cache regs

Hi,

On 2024/2/22 7:03, Sebastian Reichel wrote:
> Hi,
>
> On Mon, Feb 19, 2024 at 06:05:40PM +0800, Hermes Zhang wrote:
>> Since all of the regs in the bq27xxx_reg_cache are now cached, a simple
>> property read (such as temperature) will need nine I2C transmissions.
>> Introduce a new module parameter to enable the reg cache to be configured,
>> which decrease the amount of unnecessary I2C transmission and preventing
>> the error -16 (EBUSY) happen when working on an I2C bus that is shared by
>> many devices.
> So the problem is not the caching, but the grouping. So instead
> of adding this hack, please change the code to do the caching
> per register. That way you can just keep the caching enabled and
> don't need any custom module parameters.

Thanks for the reply. Yes, the key is the grouping. So do you suggest to 
drop the bq27xxx_reg_cache struct totally and handle the cache for each 
register in e.g. bq27xxx_battery_get_property()? Then it will require an 
extra time info for each register, will that be a big cost? Or am I 
misunderstanding?

Best Regards,

Hermes


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ