Message ID | 1500620116-20476-1-git-send-email-acelan.kao@canonical.com (mailing list archive) |
---|---|
State | RFC |
Headers | show |
On Fri, 2017-07-21 at 14:55 +0800, AceLan Kao wrote: > add some new kv[mz]alloc functions which introduced after v4.12 > by this commit > > commit a7c3e901a46ff54c016d040847eda598a9e3e653 > Author: Michal Hocko <mhocko@suse.com> > Date: Mon May 8 15:57:09 2017 -0700 > > mm: introduce kv[mz]alloc helpers > > Signed-off-by: AceLan Kao <acelan.kao@canonical.com> > --- I don't see any backported code using any of these yet... Why do you need it? -- Cheers, Luca. -- To unsubscribe from this list: send the line "unsubscribe backports" in
On 21-07-17 15:21, Luca Coelho wrote: > On Fri, 2017-07-21 at 14:55 +0800, AceLan Kao wrote: >> add some new kv[mz]alloc functions which introduced after v4.12 >> by this commit >> >> commit a7c3e901a46ff54c016d040847eda598a9e3e653 >> Author: Michal Hocko <mhocko@suse.com> >> Date: Mon May 8 15:57:09 2017 -0700 >> >> mm: introduce kv[mz]alloc helpers >> >> Signed-off-by: AceLan Kao <acelan.kao@canonical.com> >> --- > > I don't see any backported code using any of these yet... Why do you > need it? AceLan is trying to reinstate BT subsystem/drivers in backports so it may be needed for that. If that is true I think this patch should go in that "BT reinstatement" patch series. Regards, Arend -- To unsubscribe from this list: send the line "unsubscribe backports" in
On July 22, 2017 10:52:13 AM GMT+03:00, Arend van Spriel <arend.vanspriel@broadcom.com> wrote: >On 21-07-17 15:21, Luca Coelho wrote: >> On Fri, 2017-07-21 at 14:55 +0800, AceLan Kao wrote: >>> add some new kv[mz]alloc functions which introduced after v4.12 >>> by this commit >>> >>> commit a7c3e901a46ff54c016d040847eda598a9e3e653 >>> Author: Michal Hocko <mhocko@suse.com> >>> Date: Mon May 8 15:57:09 2017 -0700 >>> >>> mm: introduce kv[mz]alloc helpers >>> >>> Signed-off-by: AceLan Kao <acelan.kao@canonical.com> >>> --- >> >> I don't see any backported code using any of these yet... Why do you >> need it? > >AceLan is trying to reinstate BT subsystem/drivers in backports so it >may be needed for that. If that is true I think this patch should go in >that "BT reinstatement" patch series. Yeah, but I even checked BT stuff and didn't find any occurrences...
Yes, I'm compiling the backport driver with bt enabled. I'll keep all bt related commits until I resolved all the issue. BTW, the new introduced functions are required by the lib/rhashtable.c 2017-07-22 19:29 GMT+08:00 Luca Coelho <luca@coelho.fi>: > > > On July 22, 2017 10:52:13 AM GMT+03:00, Arend van Spriel <arend.vanspriel@broadcom.com> wrote: >>On 21-07-17 15:21, Luca Coelho wrote: >>> On Fri, 2017-07-21 at 14:55 +0800, AceLan Kao wrote: >>>> add some new kv[mz]alloc functions which introduced after v4.12 >>>> by this commit >>>> >>>> commit a7c3e901a46ff54c016d040847eda598a9e3e653 >>>> Author: Michal Hocko <mhocko@suse.com> >>>> Date: Mon May 8 15:57:09 2017 -0700 >>>> >>>> mm: introduce kv[mz]alloc helpers >>>> >>>> Signed-off-by: AceLan Kao <acelan.kao@canonical.com> >>>> --- >>> >>> I don't see any backported code using any of these yet... Why do you >>> need it? >> >>AceLan is trying to reinstate BT subsystem/drivers in backports so it >>may be needed for that. If that is true I think this patch should go in >>that "BT reinstatement" patch series. > > > Yeah, but I even checked BT stuff and didn't find any occurrences... > > -- > Luca. > -- > To unsubscribe from this list: send the line "unsubscribe backports" in -- To unsubscribe from this list: send the line "unsubscribe backports" in
On 07/21/2017 08:55 AM, AceLan Kao wrote: > add some new kv[mz]alloc functions which introduced after v4.12 > by this commit > > commit a7c3e901a46ff54c016d040847eda598a9e3e653 > Author: Michal Hocko <mhocko@suse.com> > Date: Mon May 8 15:57:09 2017 -0700 > > mm: introduce kv[mz]alloc helpers > > Signed-off-by: AceLan Kao <acelan.kao@canonical.com> > --- > backport/backport-include/linux/mm.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h > index 3234b37..8125310 100644 > --- a/backport/backport-include/linux/mm.h > +++ b/backport/backport-include/linux/mm.h > @@ -123,4 +123,20 @@ static inline bool page_is_pfmemalloc(struct page *page) > } > #endif /* < 4.2 */ > > +#if LINUX_VERSION_IS_LESS(4,12,0) > +extern void *kvmalloc_node(size_t size, gfp_t flags, int node); Is kvmalloc_node() implemented somewhere? It was added in kernel 4.12 and is not available in older mainline kernel versions. > +static inline void *kvmalloc(size_t size, gfp_t flags) > +{ > + return kvmalloc_node(size, flags, NUMA_NO_NODE); > +} > +static inline void *kvzalloc_node(size_t size, gfp_t flags, int node) > +{ > + return kvmalloc_node(size, flags | __GFP_ZERO, node); > +} > +static inline void *kvzalloc(size_t size, gfp_t flags) > +{ > + return kvmalloc(size, flags | __GFP_ZERO); > +} > +#endif /* < 4.12.0 */ > + > #endif /* __BACKPORT_MM_H */ > Hauke -- To unsubscribe from this list: send the line "unsubscribe backports" in
Sorry, please ignore this patch. I reverted it in my tree but forgot to send a note out. 2017-09-07 6:05 GMT+08:00 Hauke Mehrtens <hauke@hauke-m.de>: > On 07/21/2017 08:55 AM, AceLan Kao wrote: >> add some new kv[mz]alloc functions which introduced after v4.12 >> by this commit >> >> commit a7c3e901a46ff54c016d040847eda598a9e3e653 >> Author: Michal Hocko <mhocko@suse.com> >> Date: Mon May 8 15:57:09 2017 -0700 >> >> mm: introduce kv[mz]alloc helpers >> >> Signed-off-by: AceLan Kao <acelan.kao@canonical.com> >> --- >> backport/backport-include/linux/mm.h | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h >> index 3234b37..8125310 100644 >> --- a/backport/backport-include/linux/mm.h >> +++ b/backport/backport-include/linux/mm.h >> @@ -123,4 +123,20 @@ static inline bool page_is_pfmemalloc(struct page *page) >> } >> #endif /* < 4.2 */ >> >> +#if LINUX_VERSION_IS_LESS(4,12,0) >> +extern void *kvmalloc_node(size_t size, gfp_t flags, int node); > > Is kvmalloc_node() implemented somewhere? It was added in kernel 4.12 > and is not available in older mainline kernel versions. > >> +static inline void *kvmalloc(size_t size, gfp_t flags) >> +{ >> + return kvmalloc_node(size, flags, NUMA_NO_NODE); >> +} >> +static inline void *kvzalloc_node(size_t size, gfp_t flags, int node) >> +{ >> + return kvmalloc_node(size, flags | __GFP_ZERO, node); >> +} >> +static inline void *kvzalloc(size_t size, gfp_t flags) >> +{ >> + return kvmalloc(size, flags | __GFP_ZERO); >> +} >> +#endif /* < 4.12.0 */ >> + >> #endif /* __BACKPORT_MM_H */ >> > > Hauke > -- To unsubscribe from this list: send the line "unsubscribe backports" in
diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h index 3234b37..8125310 100644 --- a/backport/backport-include/linux/mm.h +++ b/backport/backport-include/linux/mm.h @@ -123,4 +123,20 @@ static inline bool page_is_pfmemalloc(struct page *page) } #endif /* < 4.2 */ +#if LINUX_VERSION_IS_LESS(4,12,0) +extern void *kvmalloc_node(size_t size, gfp_t flags, int node); +static inline void *kvmalloc(size_t size, gfp_t flags) +{ + return kvmalloc_node(size, flags, NUMA_NO_NODE); +} +static inline void *kvzalloc_node(size_t size, gfp_t flags, int node) +{ + return kvmalloc_node(size, flags | __GFP_ZERO, node); +} +static inline void *kvzalloc(size_t size, gfp_t flags) +{ + return kvmalloc(size, flags | __GFP_ZERO); +} +#endif /* < 4.12.0 */ + #endif /* __BACKPORT_MM_H */
add some new kv[mz]alloc functions which introduced after v4.12 by this commit commit a7c3e901a46ff54c016d040847eda598a9e3e653 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 8 15:57:09 2017 -0700 mm: introduce kv[mz]alloc helpers Signed-off-by: AceLan Kao <acelan.kao@canonical.com> --- backport/backport-include/linux/mm.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)