Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread kbuild test robot
Hi linux-scsi-owner, Thank you for the patch! Yet something to improve: [auto build test ERROR on mkp-scsi/for-next] [also build test ERROR on v4.19-rc8 next-20181019] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Bart Van Assche
On Fri, 2018-10-19 at 15:55 -0400, Douglas Gilbert wrote: > On 2018-10-19 11:22 a.m., Bart Van Assche wrote: > > On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote: > > > static void > > > -sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo) > > > +sg_fill_request_table(struct

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Douglas Gilbert
On 2018-10-19 11:22 a.m., Bart Van Assche wrote: On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote: static void -sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo) +sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo, + int max_num) {

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Bart Van Assche
On Fri, 2018-10-19 at 10:38 -0400, Tony Battersby wrote: > Incidentally, I have been using my own home-grown target-mode SCSI > system for the past 16 years, but now I am starting to look into > switching to SCST. I was just reading about their "SGV cache": > > http://scst.sourceforge.net/scst_pg

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Bart Van Assche
On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote: > static void > -sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo) > +sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo, > + int max_num) > { > struct sg_request *srp; >

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Tony Battersby
On 10/19/18 2:24 AM, Douglas Gilbert wrote: > + if (sfp->tot_fd_thresh) > + sfp->sum_fd_dlens += align_sz; > What lock protects sfp->sum_fd_dlens? > /* > @@ -2216,38 +2401,85 @@ sg_add_request(struct sg_fd *sfp) > * data length exceeds rem_sgat_thresh then the data (or sgat) i

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread kbuild test robot
Hi linux-scsi-owner, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on v4.19-rc8 next-20181019] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://git

[PATCH 5/8] sg: add free list, rework locking

2018-10-18 Thread Douglas Gilbert
Remove fixed 16 sg_request object array and replace with an active rq_list plus a request free list. Add finer grained spin lock to sg_request and do a major rework on locking. sg_request objects now are only de-allocated when the owning file descriptor is closed. This simplifies locking issues. S