Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1722975 > unrolled thread
| Started by | Long Li <longli@microsoft.com> |
|---|---|
| First post | 2017-08-30 04:20 +0200 |
| Last post | 2017-08-30 20:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message with data payload Long Li <longli@microsoft.com> - 2017-08-30 04:20 +0200
Re: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message with data payload Christoph Hellwig <hch@infradead.org> - 2017-08-30 11:00 +0200
RE: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message with data payload Long Li <longli@microsoft.com> - 2017-08-30 20:20 +0200
| From | Long Li <longli@microsoft.com> |
|---|---|
| Date | 2017-08-30 04:20 +0200 |
| Subject | RE: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message with data payload |
| Message-ID | <uk0LM-2mC-9@gated-at.bofh.it> |
> -----Original Message----- > From: Christoph Hellwig [mailto:hch@infradead.org] > Sent: Sunday, August 13, 2017 3:24 AM > To: Long Li <longli@microsoft.com> > Cc: Steve French <sfrench@samba.org>; linux-cifs@vger.kernel.org; samba- > technical@lists.samba.org; linux-kernel@vger.kernel.org; Long Li > <longli@microsoft.com> > Subject: Re: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer > message with data payload > > You can always get the struct page for kernel allocations using virt_to_page > (or vmalloc_to_page, but this code would not handle the vmalloc case either), > so I don't think you need this helper and can always use the one added in the > previous patch. 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.
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2017-08-30 11:00 +0200 |
| Subject | Re: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message with data payload |
| Message-ID | <uk70S-66H-29@gated-at.bofh.it> |
| In reply to | #1722975 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Long Li <longli@microsoft.com> |
|---|---|
| Date | 2017-08-30 20:20 +0200 |
| Message-ID | <ukfKO-3iH-15@gated-at.bofh.it> |
| In reply to | #1723131 |
> -----Original Message----- > From: Christoph Hellwig [mailto:hch@infradead.org] > Sent: Wednesday, August 30, 2017 1:52 AM > To: Long Li <longli@microsoft.com> > Cc: Christoph Hellwig <hch@infradead.org>; Steve French > <sfrench@samba.org>; linux-cifs@vger.kernel.org; samba- > technical@lists.samba.org; linux-kernel@vger.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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web