Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1723131

Re: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message with data payload

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [[PATCH v1] 15/37] [CIFS] SMBD: Post a SMBD data transfer message with data payload
Date 2017-08-30 11:00 +0200
Message-ID <uk70S-66H-29@gated-at.bofh.it> (permalink)
References <ua8hz-6jk-3@gated-at.bofh.it> <ua8rg-6nd-5@gated-at.bofh.it> <udYjD-60l-3@gated-at.bofh.it> <uk0LM-2mC-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web