Re: [PATCH 1/4] mm/highmem: Lift memcpy_[to|from]_page to core

2021-02-07 Thread Chaitanya Kulkarni
On 2/7/21 19:13, Ira Weiny wrote: >>> +static inline void memcpy_from_page(char *to, struct page *page, size_t >>> offset, size_t len) >> How about following ? >> static inline void memcpy_from_page(char *to, struct page *page, size_t >> offset, >> size_t len)

Re: [PATCH 1/4] mm/highmem: Lift memcpy_[to|from]_page to core

2021-02-07 Thread Ira Weiny
On Sun, Feb 07, 2021 at 01:46:47AM +, Chaitanya Kulkarni wrote: > On 2/5/21 18:35, ira.we...@intel.com wrote: > > +static inline void memmove_page(struct page *dst_page, size_t dst_off, > > + struct page *src_page, size_t src_off, > > + size_t

Re: [PATCH 1/4] mm/highmem: Lift memcpy_[to|from]_page to core

2021-02-06 Thread Chaitanya Kulkarni
On 2/5/21 18:35, ira.we...@intel.com wrote: > +static inline void memmove_page(struct page *dst_page, size_t dst_off, > +struct page *src_page, size_t src_off, > +size_t len) > +{ > + char *dst = kmap_local_page(dst_page); > + char

[PATCH 1/4] mm/highmem: Lift memcpy_[to|from]_page to core

2021-02-05 Thread ira . weiny
From: Ira Weiny Working through a conversion to a call kmap_local_page() instead of kmap() revealed many places where the pattern kmap/memcpy/kunmap occurred. Eric Biggers, Matthew Wilcox, Christoph Hellwig, Dan Williams, and Al Viro all suggested putting this code into helper functions. Al