svn commit: r289565 - head/sys/ofed/include/linux

Jean-Sébastien Pédron jean-sebastien.pedron at dumbbell.fr
Mon Oct 19 16:08:41 UTC 2015


On 19.10.2015 17:08, Hans Petter Selasky wrote:
> On 10/19/15 17:01, Konstantin Belousov wrote:
>> This is wrong on many counts.  First, we already provide the wrappers to
>> implement the nofaulting behaviour, see vm_fault_disable_pagefaults()
>> and vm_fault_enable_pagefaults().
>>
>> Second, your implementation ignores possible recursion on the
>> state, unconditionally re-enabling faulting, and more seriously, it
>> unconditionally obliterates the spurious faults tracker.
>>
>> The return value from vm_fault_disable_pagefaults() is there for the
>> reason,
>> and if Linux KPI does not have a place to store the state, some
>> replacement
>> must be implemented instead of silently corrupting the flags on enable.
> 
> Hi Konstantin,
> 
> Thank you for you input. I'll update these functions according to your
> suggestion. We can have a return value, even if Linux doesn't. It
> doesn't have to be exactly the same and then I can set a compiler
> attribute that the return value must be checked.

Hi!

I believe we should not try to completely "hide" FreeBSD at all cost
when both KPIs do not match. If we can't implement the Linux behaviour,
I think we should not modify the Linux KPI but instead use the native
FreeBSD function. If we change the Linux KPI in a way which requires a
change in the consumers, consumers will have a diff with Linux original
code anyway, so let's use the native function and make the difference in
KPI/behaviour explicit.

To me, the goal of this shim is to reduce the diff with Linux in
consumers, not eliminate it.

-- 
Jean-Sébastien Pédron

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20151019/6f74b360/attachment.bin>


More information about the svn-src-head mailing list