[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC 07/11] Add kernel helper functions



>>> On 18.01.18 at 19:55, <julien.grall@xxxxxxxxxx> wrote:
> On 02/01/18 09:28, manish.jaggi@xxxxxxxxxx wrote:
>> From: Manish Jaggi <manish.jaggi@xxxxxxxxxx>
>> 
>> Add kalloc kfree functions from linux kernel.
> 
> This does not description all the functions you added. But I am really 
> not convinced this is the right place to do that.
> 
> This file is included in many places that should not use kmalloc & co 
> but instead Xen version.
> 
> If you still want to add it in an header, I think it would make sense to 
> create a header that will contain linuxism. So it get included only 
> where it is needed.

Indeed - if we want such helpers at all, they should be made as
invisible to any unrelated code as possible. Since Linux sources
can't normally be imported verbatim anyway, it may be best to
have such helpers near the to of affected .c files, restricted to
just the helpers that are actually needed in each individual file.
Only if this results in meaningful duplication I would consider it
reasonable to introduce a helper header.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.