Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2014 03:28:55 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        =?utf-8?B?5byg5pmX?= <zganghanhan@foxmail.com>
Cc:        freebsd-net <freebsd-net@freebsd.org>, Peter Jeremy <peter@rulingia.com>
Subject:   Re: =?utf-8?B?5Zue5aSN?= =?utf-8?B?77ya?= pow function in kernel space
Message-ID:  <20140620012855.GB5830@dft-labs.eu>
In-Reply-To: <tencent_4624B06535B229A76B4DDDED@qq.com>
References:  <mailman.75.1403092802.14182.freebsd-net@freebsd.org> <tencent_34C23E3A7E7FDFEA644A3392@qq.com> <20140619200625.GB3631@server.rulingia.com> <tencent_4624B06535B229A76B4DDDED@qq.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 20, 2014 at 08:59:49AM +0800, 张晗 wrote:
> Hi:
>   
>  I am doing a research on D2TCP(http://dl.acm.org/citation.cfm?id=2342388), I just want to implement it into the linux kernel. When calculating the penalty function, it is p = a^d, where 0< a < 1 and  0< d < 1. Since the kernel only offers integer,   so in my code, so I let a multiply 2^10. But I have no idea of calculating a^d when 0< d < 1. May be I want a  approximate algorithm or other methods. Can you help me ?
>  thanks~
>   

First of all this is a FreeBSD list and FreeBSD is not Linux.

It is possible to use FPU in kernel mode, but it requires some
additional work.

Both FreeBSD and Linux kernels provide functions for this purpose, see
kernel_fpu_begin and kernel_fpu_end on Linux.

I suggest you send further questions to some Linux-related resource,
although I can't recommend any in particular.

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140620012855.GB5830>