[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 00/21] Converge on using secs_to_jiffies()
- To: Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>
- From: Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx>
- Date: Mon, 9 Dec 2024 13:01:42 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cWO1vtST2RvN31AcCbA6YitT4GKod8x9EcWhSGYpNW4=; b=ANH8q43m/VKi3HisBqbPcLFAbHYlpaCn3rzQRLsHmO3482tc5Rwfwto41iHvFLw68zOiJ7zbZ47XSyoNddedhUlfTnupYAdArYW7cMguiTkY7nP9FfFc3eTKcuI4zYrlp+bVPvzs6G4CGhgvWEZUEgl3FpbBTDGGgMyYa+ItpquHoB/386C37g9Vk9F/pm9y7xBaM2Cr4Y3kfIY4xfaDlpDqYhNnE2FoYS+Bu4wAMeUNjS6Jgpo5K12GldF9o4pesXEwX+9ifVVuKbuGZSP081eJTtc56nD0Hot9bfDCkK/ncyQ/94MbMBgk0yN3e16g1yDNqZp4+Vf348elxgxKJw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uS+kjXWsgzoZdqSj/eSL5XfkfVfYq2cuSQRl6UEybBLULwbTmEJspFMDdwMArIfetvy4gYcDsuM4cqohT8R4TeOc8bsA48rDaCvAEqTFWn8nkGeUFJ9fVxLIEDzeFbHXhAR5WDHEBHCkJqbgHrphRZz8iNWQyfucmDPSXTq6bFAY7IP9iHDa+agBJFZ7fh4vfN0V8ruZ1jHj9aPaNXNfHPkAC1yW2/F4yT2ChxPpsBsbwc1799X8+RbJOLF3kcBnJRgN7dbK4tlBVJqg7+3pGAb2guhUk/KskQhz+9X/vLe/RosoqV8BvuwBKD1AC1yL/QitAEENUvcrg/5OuZaGmA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
- Cc: <netfilter-devel@xxxxxxxxxxxxxxx>, <coreteam@xxxxxxxxxxxxx>, <netdev@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <cocci@xxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-s390@xxxxxxxxxxxxxxx>, <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, <intel-xe@xxxxxxxxxxxxxxxxxxxxx>, <linux-scsi@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <linux-block@xxxxxxxxxxxxxxx>, <linux-wireless@xxxxxxxxxxxxxxx>, <ath11k@xxxxxxxxxxxxxxxxxxx>, <linux-mm@xxxxxxxxx>, <linux-bluetooth@xxxxxxxxxxxxxxx>, <linux-staging@xxxxxxxxxxxxxxx>, <linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx>, <ceph-devel@xxxxxxxxxxxxxxx>, <live-patching@xxxxxxxxxxxxxxx>, <linux-sound@xxxxxxxxxxxxxxx>, <etnaviv@xxxxxxxxxxxxxxxxxxxxx>, <oss-drivers@xxxxxxxxxxxx>, <linuxppc-dev@xxxxxxxxxxxxxxxx>, Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
- Delivery-date: Mon, 09 Dec 2024 12:02:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12/6/24 9:58 PM, Easwar Hariharan wrote:
On 11/29/2024 4:57 AM, Przemek Kitszel wrote:
[removed most non-list recipients, it's just too much]
On 11/15/24 10:26 PM, Easwar Hariharan wrote:
<snip>
Regarding code - you could also convert msecs_to_jiffies(const * HZ),
there are 10 that are greppable.
Those seem to be mistakes. const*HZ is a seconds-denominated timeout,
being passed to msecs_to_jiffies() which will treat it as a
millisecond-denominated timeout resulting in an excessively long
timeout. I suppose that's better than a too-short timeout, and
apparently it's been working fine all along since hardware responds
before the too-long timeout expires. Half of them are in
drivers/scsi/arcmsr/arcmsr_hba.c and the pattern has apparently been
there since 2010.
my point was that, the default value of HZ is 1000, and most of the code
that is just `$value*HZ` was meant as "$value seconds, in ms unit".
Same for HZ/const, HZ/2 being 500ms.
HZ is awful in that it is not 1s but 1/s, but it was easy to abuse the
value in simple context.
If you happen to touch this, please do in a separate series, to get more
attention from drivers owners.
Thanks,
Easwar
|