Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-09-27 Thread Martin K. Petersen
Martin, > Could you please explain why you think Don's patch is wrong? User > settings being discarded because of a BLKRRPART ioctl violates the > principle of least surprise. With Don's patch, that won't happen any > more. If hardware limits change, whether they increase or decrease, the >

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-09-09 Thread Martin Wilck
Hello Martin, On Tue, 2017-08-29 at 21:24 -0400, Martin K. Petersen wrote: > I looked at this for a bit last week to see if I could come up with > an > elegant way to accommodate values overridden in sysfs and at the same > time honor hardware limits changing. However, it quickly gets messy >

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Martin K. Petersen
Bart, > How about asking these users to create a udev rule instead of directly > modifying max_sectors_kb in sysfs? I looked at this for a bit last week to see if I could come up with an elegant way to accommodate values overridden in sysfs and at the same time honor hardware limits changing.

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Bart Van Assche
On Tue, 2017-08-29 at 22:32 +, Don Brace wrote: > Users do set max_sectors_kb for performance reasons. They can increase > performance by setting max_sectors_kb to different values depending on > their I/O needs. > > And, if they set the value, and sd_revalidate_disk changes this value, >

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Don Brace
; Scott Teel; j...@linux.vnet.ibm.com; Justin Lindley; John Hall Cc: linux-scsi@vger.kernel.org Subject: Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb EXTERNAL EMAIL On Tue, 2017-08-29 at 19:41 +, Don Brace wrote: > BLKRRPART ends up in the sd driver function sd_revalidate_d

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Bart Van Assche
On Tue, 2017-08-29 at 19:41 +, Don Brace wrote: > BLKRRPART ends up in the sd driver function sd_revalidate_disk, which resets > q->limits.max_sectors = min(rw_max, queue_max_hw_sectors(q)); > back to the value from VPD page 0xb0. > > When you cat out max_sectors_kb, it obtains it's

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Don Brace
...@linux.vnet.ibm.com; Justin Lindley; John Hall Cc: linux-scsi@vger.kernel.org Subject: RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb From: Bart Van Assche [bart.vanass...@wdc.com] Sent: Tuesday, August 29, 2017 11:13 AM To: h...@infradead.org; Viswas

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Don Brace
...@hpe.com; Scott Teel; j...@linux.vnet.ibm.com; Justin Lindley; John Hall Cc: linux-scsi@vger.kernel.org Subject: Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb EXTERNAL EMAIL On Tue, 2017-08-29 at 17:42 +, Don Brace wrote: > From: Don Brace > > [ ... ] > > Hello Don, >

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Bart Van Assche
On Tue, 2017-08-29 at 17:42 +, Don Brace wrote: > From: Don Brace > > [ ... ] > > Hello Don, > > > > Can you have another look at the udev rules on your test system? The last > > rule in 60-block.rules looks like a watch rule to me. The same holds for the > > upstream version of that file > >

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Don Brace
...@linux.vnet.ibm.com; Justin Lindley; John Hall Cc: linux-scsi@vger.kernel.org Subject: RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb > -Original Message- > From: Bart Van Assche [mailto:bart.vanass...@wdc.com] > Sent: Monday, August 21, 2017 2:53 PM > To: h...@infradead.o

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-29 Thread Don Brace
...@linux.vnet.ibm.com; Justin Lindley; John Hall Cc: linux-scsi@vger.kernel.org Subject: RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb > -Original Message- > From: Bart Van Assche [mailto:bart.vanass...@wdc.com] > Sent: Monday, August 21, 2017 2:53 PM > To: h...@infradead.o

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-21 Thread Don Brace
el > <scott.t...@microsemi.com>; j...@linux.vnet.ibm.com; Justin Lindley > <justin.lind...@microsemi.com>; John Hall <john.h...@microsemi.com> > Cc: linux-scsi@vger.kernel.org > Subject: Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb > > EXTERNAL EMAIL &g

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-21 Thread Bart Van Assche
On Mon, 2017-08-21 at 19:12 +, Don Brace wrote: > On Friday Bart Van Assche wrote: > > Can you check on your test system which udev rule changes > > max_sectors_kb? I > > have checked two recent Linux distro's but haven't been able to find > > such a udev rule: > > $ grep -rw max_sectors_kb

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-21 Thread Don Brace
el > <scott.t...@microsemi.com>; j...@linux.vnet.ibm.com; Justin Lindley > <justin.lind...@microsemi.com>; John Hall <john.h...@microsemi.com> > Cc: linux-scsi@vger.kernel.org > Subject: Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb > > EXTERNAL EM

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-18 Thread Bart Van Assche
On Fri, 2017-08-18 at 21:29 +, Don Brace wrote: > As far as I can see, udev looks for file access in sysfs. > I am not exactly sure which rule changes this. It was added in more recent > distros. Can someone help me out? Hello Don, Can you check on your test system which udev rule changes

RE: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-18 Thread Don Brace
el > <scott.t...@microsemi.com>; j...@linux.vnet.ibm.com; Justin Lindley > <justin.lind...@microsemi.com>; John Hall <john.h...@microsemi.com> > Cc: linux-scsi@vger.kernel.org > Subject: Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb > > EXTERNAL EMAIL &g

Re: [PATCH] sd: preserve sysfs updates to max_sectors_kb

2017-08-18 Thread Bart Van Assche
On Fri, 2017-08-18 at 16:00 -0500, Don Brace wrote: > prevent systemd-udevd from changing a device's sysfs entry > max_sectors_kb back to the default value. > - max_sectors_kb can be tweaked for better performance. > - udev can be triggered by sg_logs -t or scsi_temperature, ... > -