[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MWHPR21MB0190190191D33EA77F561910CE9C0@MWHPR21MB0190.namprd21.prod.outlook.com>
Date: Wed, 30 Aug 2017 18:17:03 +0000
From: Long Li <longli@...rosoft.com>
To: Christoph Hellwig <hch@...radead.org>
CC: Steve French <sfrench@...ba.org>,
"linux-cifs@...r.kernel.org" <linux-cifs@...r.kernel.org>,
"samba-technical@...ts.samba.org" <samba-technical@...ts.samba.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message
with data payload
> -----Original Message-----
> From: Christoph Hellwig [mailto:hch@...radead.org]
> Sent: Wednesday, August 30, 2017 1:52 AM
> To: Long Li <longli@...rosoft.com>
> Cc: Christoph Hellwig <hch@...radead.org>; Steve French
> <sfrench@...ba.org>; linux-cifs@...r.kernel.org; samba-
> technical@...ts.samba.org; linux-kernel@...r.kernel.org
> Subject: Re: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer
> message with data payload
>
> On Wed, Aug 30, 2017 at 02:17:56AM +0000, Long Li wrote:
> > I partially addressed this issue in the V3 patch. Most of the
> > duplicate code on sending path is merged.
> >
> > The difficulty with translating the buffer to pages is that: I don't
> > know how many pages will be translated, and how many struct page I
> > need to allocate in advance to hold them. I try to avoid memory
> > allocation in the I/O path as much as possible. So I keep two
> > functions of sending data: one for buffer and one for pages.
>
> You do: you'll always need speace for (len + PAGE_SIZE - 1) >> PAGE_SIZE
> pages.
>
> That being said: what callers even send you buffers? In general we should
> aim to work with pages for all allocations that aren't tiny.
I'll look through the code allocating the buffers, it probably can fit into one page. Will fix this.
Powered by blists - more mailing lists