Re: [PATCH V2 01/13] pm80xx : Increase request sg length.

Jinpu Wang
2020-01-17T15:53:39Z

On Fri, Jan 17, 2020 at 4:50 PM <Deepak.Ukey@microchip.com> wrote:
>
> On Fri, Jan 17, 2020 at 8:10 AM Deepak Ukey <deepak.ukey@microchip.com> wrote:
> >
> > From: Peter Chang <dpf@google.com>
> >
> > Increasing the per-request size maximum (max_sectors_kb) runs into the
> > per-device dma scatter gather list limit (max_segments) for users of
> > the io vector system calls (eg, readv and writev). This is because the
> > kernel combines io vectors into dma segments when possible, but it
> > doesn't work for our user because the vectors in the buffer cache get
> > scrambled.
> > This change bumps the advertised max scatter gather length to 528 to
> > cover 2M w/ x86's 4k pages and some extra for the user checksum.
> > It trims the size of some of the tables we don't care about and
> > exposes all of the command slots upstream to the scsi layer
> >
> > Signed-off-by: Peter Chang <dpf@google.com>
> > Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
> > Signed-off-by: Viswas G <Viswas.G@microchip.com>
> > Signed-off-by: Radha Ramachandran <radha@google.com>
> > Reported-by: kbuild test robot <lkp@intel.com>
> > ---
> > drivers/scsi/pm8001/pm8001_defs.h | 5 +++--
> > drivers/scsi/pm8001/pm8001_init.c | 2 +-
> > 2 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/scsi/pm8001/pm8001_defs.h
> > b/drivers/scsi/pm8001/pm8001_defs.h
> > index 48e0624ecc68..1c7f15fd69ce 100644
> > --- a/drivers/scsi/pm8001/pm8001_defs.h
> > +++ b/drivers/scsi/pm8001/pm8001_defs.h
> > @@ -75,7 +75,7 @@ enum port_type {
> > };
> >
> > /* driver compile-time configuration */
> > -#define PM8001_MAX_CCB 512 /* max ccbs supported */
> > +#define PM8001_MAX_CCB 256 /* max ccbs supported */
> Hi Deepack,
>
> Why do you reduce PM8001_MAX_CCB?
> --- PM8001 driver has a memory limit in the machine.
which limit, do you see allocation failure from kernel?
Thanks