Re: Question about memcpy

2018-07-12 Thread bing zhu
I‘m trying to write a simple fs in user space,if memcpy is slower than kernel , i think it's unfair,as for only cpu for my task, it's a bit of arbitrary ,i just want my task not interrupted during a specific time is that possible ? 2018-07-12 22:53 GMT+08:00 Greg KH : > A:

Re: mmap huge page and MAP_SYNC flag support

2018-07-12 Thread David Frank
Tried everything in here:How do I install kernel header files? | | | | | | | | | | | How do I install kernel header files? i want to write a device driver but not able to find the header file can someone please help me find them?Also i... | | | nothing worked. On

Re: mmap huge page and MAP_SYNC flag support

2018-07-12 Thread David Frank
By the way, when I havemmap(NULL, MAPSIZE, PROT_WRITE_|PROT_READ, MAP_HUGETLB|MAP_PRIVATE, fd, 0):where MAPSIZE= 2GB,it fails witherror = 22, invalid argument, without MAP_HUGETLB, it was ok. On Thursday, July 12, 2018, 4:44:35 PM EDT, wrote: On Thu, 12 Jul 2018 20:33:32 -,

Re: mmap huge page and MAP_SYNC flag support

2018-07-12 Thread valdis . kletnieks
On Thu, 12 Jul 2018 20:33:32 -, David Frank said: > I got it from hereHow To Install Kernel 4.15 RC7 on Ubuntu, Linux Mint, > Elementary OS And Other Ubuntu Derivatives | LinuxG.net Looks like you got the linux-image-... .deb but didn't do the linux-headers-... .deb(s). (And I have no

Re: mmap huge page and MAP_SYNC flag support

2018-07-12 Thread David Frank
I got it from hereHow To Install Kernel 4.15 RC7 on Ubuntu, Linux Mint, Elementary OS And Other Ubuntu Derivatives | LinuxG.net | | | | How To Install Kernel 4.15 RC7 on Ubuntu, Linux Mint, Elementary OS And ... | | | no headers On Thursday, July 12, 2018, 4:22:33 PM EDT,

Re: mmap huge page and MAP_SYNC flag support

2018-07-12 Thread valdis . kletnieks
On Thu, 12 Jul 2018 20:10:36 -, David Frank said: > Thanks Valdis.Looks like the failure is that I can not write to a 2GB buffer > (char bf[2GB size]).Where do I get the distro include file? >From the same exact place you got the distro kernel from. (I'm guessing it's a distro kernel from

Re: mmap huge page and MAP_SYNC flag support

2018-07-12 Thread David Frank
Thanks Valdis.Looks like the failure is that I can not write to a 2GB buffer (char bf[2GB size]).Where do I get the distro include file? On Thursday, July 12, 2018, 2:58:49 PM EDT, valdis.kletni...@vt.edu wrote: On Thu, 12 Jul 2018 18:44:43 -, David Frank said: > Hi,How do I

Re: mmap huge page and MAP_SYNC flag support

2018-07-12 Thread valdis . kletnieks
On Thu, 12 Jul 2018 18:44:43 -, David Frank said: > Hi,How do I enable the MAP_SYNC flag in mmap for linux 4.15, my code does not > compile with that flag on linux 4.15.0-041500rc7-generic #201801072330 Get your distro to ship an update to /usr/include/linux (kernel-headers) that contains

mmap huge page and MAP_SYNC flag support

2018-07-12 Thread David Frank
Hi,How do I enable the MAP_SYNC flag in mmap for linux 4.15, my code does not compile with that flag on linux 4.15.0-041500rc7-generic #201801072330 Also, how do I make mmap support map size of 2GB or larger, currently the call to mmap fails with mapsize of 2GB. thanks, David

Re: Question about memcpy

2018-07-12 Thread valdis . kletnieks
On Thu, 12 Jul 2018 22:27:37 +0800, bing zhu said: > as for memcpy ,kernel is faster than user ,might because schedule ,can i > try to make user as fast as kernel ? Do you have an actual issue where the difference in speed of these two things makes a difference? Or is this primarily a mental

Re: Question about memcpy

2018-07-12 Thread Greg KH
A: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I

Re: Question about memcpy

2018-07-12 Thread bing zhu
as for memcpy ,kernel is faster than user ,might because schedule ,can i try to make user as fast as kernel ? 2018-07-12 13:34 GMT+08:00 Greg KH : > On Thu, Jul 12, 2018 at 12:47:12PM +0800, bing zhu wrote: > > agree! a simple rename would survice.results are the same .kernel is > faster > >