Re: [PATCH v2 1/2] mm: Export nr_swap_pages

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

 



On Mon, Dec 07, 2015 at 06:10:00PM +0000, Dave Gordon wrote:
> Exporting random uncontrolled variables from the kernel to loaded modules is
> not really considered best practice. It would be preferable to provide an
> accessor function - which is just what the declaration says we have; the
> implementation as a static inline (and/or macro) is what causes the problem
> here.

No, what causes the problem is thinking we can't trust in-kernel code.
If somebody screws up, we can fix it easily enough. Sure, we shouldn't
be laying traps and create easy-to-misuse interfaces, but that's not
what's happening here. There is no reason to add function overhead to
what should be a single 'mov' instruction.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux