Re: mlock & COW

2008-04-12 Thread Kip Macy
> As I said, messy. > Yup, which is why I bypassed the whole affair to have any confidence in my solution. Bypassing the copy to user makes a huge difference cpu usage at 10Gbps. -Kip ___ freebsd-hackers@freebsd.org mailing list http://lists.freeb

Re: mlock & COW

2008-04-12 Thread Matthew Dillon
:> vm_map_lookup() line 3161 and line 3297 (FreeBSD current). Commenting :> those out will allow the COW on the user-wired page: :> :> if ((entry->eflags & MAP_ENTRY_USER_WIRED) && :> (entry->eflags & MAP_ENTRY_COW) && :> (fault_type & VM_PROT_WRITE) && :>

Re: mlock & COW

2008-04-12 Thread Kip Macy
On Sat, Apr 12, 2008 at 2:56 PM, Matthew Dillon <[EMAIL PROTECTED]> wrote: > I've looked at it some more and it looks like it would be a real > mess to do it in the protection code. I think it may be best to > fix it in the fault code. That is, to explicitly allow a user-wired > p

Re: mlock & COW

2008-04-12 Thread Matthew Dillon
I've looked at it some more and it looks like it would be a real mess to do it in the protection code. I think it may be best to fix it in the fault code. That is, to explicitly allow a user-wired page to be write-faulted. The primary protection check that is causing the segv

Re: mlock & COW

2008-04-12 Thread Matthew Dillon
:I've been battling with a bug related to mlock and COW pages. Since I'm :basically clueless when it comes to the VM subsystem, I was hoping someone :with more clue can look at my fix and let me know if I'm doing the right :thing here. : :The problem: User programs will crash (SEGV/BUS) if COW

Re: mlock & COW

2008-03-09 Thread Kip Macy
On Sun, Mar 9, 2008 at 2:24 PM, Jonathan Chen <[EMAIL PROTECTED]> wrote: > I've been battling with a bug related to mlock and COW pages. Since I'm > basically clueless when it comes to the VM subsystem, I was hoping someone > with more clue can look at my fix and let me know if I'm doing the rig

mlock & COW

2008-03-09 Thread Jonathan Chen
I've been battling with a bug related to mlock and COW pages. Since I'm basically clueless when it comes to the VM subsystem, I was hoping someone with more clue can look at my fix and let me know if I'm doing the right thing here. The problem: User programs will crash (SEGV/BUS) if COW pages