Page MenuHomeFreeBSD
Feed Advanced Search

Today

markj committed rS343205: MFC r343117:.
MFC r343117:
Sun, Jan 20, 12:59 AM

Fri, Jan 18

markj accepted D18851: Optimize RISC-V copyin(9)/copyout(9) routines.

You can add your copyright to this file if you feel so inclined.

Fri, Jan 18, 8:33 PM
markj accepted D18850: Extract common code in copyin/copyout to local routine.

Elsewhere something similar is done with a macro, but I don't see much of a benefit either way.

Once these changes are in I think we'll want to modify copy{in,instr,out}() to save a copy of the frame pointer. In this case, we'd also have to modify copycommon() to do the same, so the use of a subroutine would be adding an extra pair of stack operations plus the unconditional jump. This makes me slightly inclined towards using a macro, but I'm not sure if anyone else finds it convincing. :)

I get the feeling the performance differences would be too small to measure, but in general I'd take a few extra bytes of code over the extra instructions, so I can switch it to use the macro.
Only reason I can think of not to is if we expect copycommon to grow again substantially in the future.

Fri, Jan 18, 8:30 PM
markj added inline comments to D18880: Extend mmap(2) API to specify the max page protections..
Fri, Jan 18, 7:56 PM
markj added inline comments to D18880: Extend mmap(2) API to specify the max page protections..
Fri, Jan 18, 7:16 PM
markj added inline comments to D18880: Extend mmap(2) API to specify the max page protections..
Fri, Jan 18, 7:06 PM
markj updated the diff for D18874: Implement per-CPU pmap activation tracking..
  • Address kib's comments.
Fri, Jan 18, 6:43 PM
markj added inline comments to D18863: RISC-V superpage support, part 1/6..
Fri, Jan 18, 5:43 PM
markj added a comment to D18876: netmap: fix knote() argument to match the mutex state.

Thanks a lot for testing! Yes, a lot of comments looked really inconsistent with the code. I did some more consistent update.
It would be great if you could run your tests again, since I've done a small code change in netmap_knrw().

Regarding your question, honestly I am not sure that knote() can be called from f_event, because I don't know the details of how kevent/kqueue works.
Let's assume it can be done, and in the meanwhile I'll ask around.

Fri, Jan 18, 4:53 PM

Thu, Jan 17

markj added reviewers for D18874: Implement per-CPU pmap activation tracking.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 6:46 PM
markj added reviewers for D18875: Implement pmap_clear_modify() for RISC-V.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 6:46 PM
markj committed rS343117: Fix handling of rights on stdio streams..
Fix handling of rights on stdio streams.
Thu, Jan 17, 5:36 PM
markj closed D18860: Fix cmp(1) to handle the case where standard streams are closed..
Thu, Jan 17, 5:36 PM
markj added a comment to D18850: Extract common code in copyin/copyout to local routine.

Elsewhere something similar is done with a macro, but I don't see much of a benefit either way.

Thu, Jan 17, 5:11 PM
markj created D18875: Implement pmap_clear_modify() for RISC-V..
Thu, Jan 17, 5:00 PM
markj created D18874: Implement per-CPU pmap activation tracking..
Thu, Jan 17, 5:00 PM
markj added inline comments to D18851: Optimize RISC-V copyin(9)/copyout(9) routines.
Thu, Jan 17, 4:54 PM
markj added inline comments to D18851: Optimize RISC-V copyin(9)/copyout(9) routines.
Thu, Jan 17, 4:23 PM
markj accepted D18850: Extract common code in copyin/copyout to local routine.

Elsewhere something similar is done with a macro, but I don't see much of a benefit either way.

Thu, Jan 17, 4:08 PM
markj updated the diff for D18860: Fix cmp(1) to handle the case where standard streams are closed..

Don't bother limiting rights on stdin beyond what caph_limit_stdio()
does.

Thu, Jan 17, 4:02 PM
markj added inline comments to D18860: Fix cmp(1) to handle the case where standard streams are closed..
Thu, Jan 17, 4:00 PM
markj added reviewers for D18868: RISC-V superpage support, part 6/6.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 2:55 AM
markj added reviewers for D18867: RISC-V superpage support, part 5/6.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 2:55 AM
markj added reviewers for D18866: RISC-V superpage support, part 4/6.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 2:55 AM
markj added reviewers for D18865: RISC-V superpage support, part 3/6.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 2:54 AM
markj added reviewers for D18864: RISC-V superpage support, part 2/6.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 2:54 AM
markj added reviewers for D18863: RISC-V superpage support, part 1/6.: alc, kib, jhb, br, mhorne063_gmail.com.
Thu, Jan 17, 2:54 AM
markj created D18868: RISC-V superpage support, part 6/6..
Thu, Jan 17, 2:52 AM
markj created D18867: RISC-V superpage support, part 5/6..
Thu, Jan 17, 2:52 AM
markj created D18866: RISC-V superpage support, part 4/6..
Thu, Jan 17, 2:52 AM
markj created D18865: RISC-V superpage support, part 3/6..
Thu, Jan 17, 2:52 AM
markj created D18864: RISC-V superpage support, part 2/6..
Thu, Jan 17, 2:52 AM
markj created D18863: RISC-V superpage support, part 1/6..
Thu, Jan 17, 2:52 AM

Wed, Jan 16

markj updated the diff for D18860: Fix cmp(1) to handle the case where standard streams are closed..
  • Verify that STDIN_FILENO is in use before limiting rights on it. In practice, it will always be in use: if STDIN_FILENO is not provided by the shell, then it will be claimed for fd1. But, we should not make assumptions about the kernel's fd allocation policy.
Wed, Jan 16, 9:57 PM
markj added inline comments to D18860: Fix cmp(1) to handle the case where standard streams are closed..
Wed, Jan 16, 9:45 PM
markj added reviewers for D18860: Fix cmp(1) to handle the case where standard streams are closed.: oshogbo, capsicum.
Wed, Jan 16, 8:40 PM
markj created D18860: Fix cmp(1) to handle the case where standard streams are closed..
Wed, Jan 16, 8:39 PM
markj added inline comments to D15091: HWPMC tracing support (5) -- Intel PT.
Wed, Jan 16, 8:26 PM
markj added inline comments to D12875: HWPMC tracing support (1) -- main.
Wed, Jan 16, 7:22 PM
markj added inline comments to D15089: HWPMC tracing support (2) -- VM.
Wed, Jan 16, 5:56 PM
markj added inline comments to D18623: Address the fact that errors from `copyout(9)` are not properly percolated up on failure.
Wed, Jan 16, 5:49 PM
markj abandoned D18599: Fix compile warning in if_fxp(4)..
Wed, Jan 16, 5:43 PM
markj accepted D18854: x86 busdma: fix mis-use of bus_addr_t where vm_paddr_t is assumed..
Wed, Jan 16, 5:38 PM
markj accepted D18853: MI VM: Make it possible to set size of superpage at boot instead of compile time..

Do you plan to use PAE page tables even if there is less than 4GB of physical memory available?

Wed, Jan 16, 5:14 PM
markj committed rS343076: MFC r342887:.
MFC r342887:
Wed, Jan 16, 3:07 AM

Tue, Jan 15

markj accepted D18837: Implement shmat(2) flag SHM_REMAP..
Tue, Jan 15, 4:45 PM
markj updated the diff for D16667: Extend uma_reclaim() to permit different reclamation targets..

Rebase.

Tue, Jan 15, 2:17 AM
markj committed rS343034: MFC r342863:.
MFC r342863:
Tue, Jan 15, 2:09 AM
markj updated the diff for D16667: Extend uma_reclaim() to permit different reclamation targets..
  • Update libmemstat after converting the bucket list to a tailq.
Tue, Jan 15, 1:49 AM

Mon, Jan 14

markj added a comment to D18837: Implement shmat(2) flag SHM_REMAP..

This seems ok to me. I'm not sure about modifying the NetBSD tests, might be nice to wrap them with #ifdef SHM_REMAP if they are to be upstreamed.

Mon, Jan 14, 6:09 PM
markj added a comment to D18824: Raise __MINSIGSTKSZ on amd64..
In D18824#402111, @kib wrote:
  1. Ignore the problem. FWIW, I encountered this problem in a valgrind regression test.
  2. Modify PTHREAD_STACK_MIN (define it to 4096 for all platforms) and define a compat version of pthread_attr_setstacksize() which accepts the old PTHREAD_STACK_MIN.

Isn't this is what was proposed by you before ? Except without a compat symbol, and I do not see how compat symbol is helpful.
And then it is what should be done if we change PTHREAD_STACK_MIN.

Mon, Jan 14, 4:41 PM

Sun, Jan 13

markj added a comment to D18824: Raise __MINSIGSTKSZ on amd64..
In D18824#401965, @kib wrote:
In D18824#401882, @kib wrote:

Indeed this changes the ABI and while I do not see why not change PTHREAD_STACK_MIN value, I would prefer to keep the library accepting the old min stack value. Otherwise we break old programs which use PTHREAD_STACK_MIN, and such programs exist even in base.

Hmm, I don't see any actual uses? Indeed, there are some references in ntpd, but the code there only makes sure that its internal minimum stack size of 64KB is not smaller than PTHREAD_STACK_MIN. And, I do not see how any dynamically linked programs can successfully use a stack size of PTHREAD_STACK_MIN today.

They can, if they do not exit threads, but terminate the whole process e.g. from the main thread. And from my experience, this is very popular usage model.

I looked at the PTHREAD_STACK_MIN usage on debian code search tool. Unfortunately, it is not very useful because the search results are overloaded with hits from glibc and gcc. Most other uses are to ensure that if some user provided a stack size less that PTHREAD_STACK_MIN than PTHREAD_STACK_MIN is specified. Worrying part is that such code exists e.g. in the perl xs processor, which means that lazy users which pass 0 as a stack size suddently stop work after we require 4096 min stack size.

Sun, Jan 13, 8:27 PM

Sat, Jan 12

markj committed rS342970: MFC r342787:.
MFC r342787:
Sat, Jan 12, 5:01 PM
markj committed rS342969: MFC r342888:.
MFC r342888:
Sat, Jan 12, 4:58 PM
markj added a comment to D18824: Raise __MINSIGSTKSZ on amd64..
In D18824#401882, @kib wrote:

Indeed this changes the ABI and while I do not see why not change PTHREAD_STACK_MIN value, I would prefer to keep the library accepting the old min stack value. Otherwise we break old programs which use PTHREAD_STACK_MIN, and such programs exist even in base.

Sat, Jan 12, 4:49 PM
markj edited P245 Masterwork From Distant Lands.
Sat, Jan 12, 4:40 PM
markj edited P244 Masterwork From Distant Lands.
Sat, Jan 12, 4:38 PM

Fri, Jan 11

markj accepted D17930: clang: default to DWARF 4 as of FreeBSD 12.

ISTR a comment somewhere mentioning that DWARF2 was required on FreeBSD, but maybe it's gone in newer versions.

Fri, Jan 11, 8:43 PM
markj added a comment to D18824: Raise __MINSIGSTKSZ on amd64..

I should have noted that this breaks the ABI, so I was planning to bump __FreeBSD_version. Alternately, we might instead decouple PTHREAD_STACK_MIN from MINSIGSTKSZ and just hardcode it to 4096.

Fri, Jan 11, 7:47 PM
markj added a reviewer for D18824: Raise __MINSIGSTKSZ on amd64.: kib.
Fri, Jan 11, 7:30 PM
markj created D18824: Raise __MINSIGSTKSZ on amd64..
Fri, Jan 11, 7:29 PM
markj committed rS342929: MFC r342768:.
MFC r342768:
Fri, Jan 11, 3:51 AM

Thu, Jan 10

markj accepted D18812: Fix errno values returned from DUMMY_XATTR linuxulator calls..

The duplication of these stubs is rather unfortunate...

Thu, Jan 10, 5:30 PM

Wed, Jan 9

markj committed rS342892: MFC r342686:.
MFC r342686:
Wed, Jan 9, 5:42 PM
markj committed rS342891: MFC r342686:.
MFC r342686:
Wed, Jan 9, 5:39 PM
markj committed rS342890: MFC r342687:.
MFC r342687:
Wed, Jan 9, 5:39 PM
markj committed rS342888: Complete the removal of obsolete ioctl handlers..
Complete the removal of obsolete ioctl handlers.
Wed, Jan 9, 5:23 PM
markj closed D18778: Complete r342182..
Wed, Jan 9, 5:23 PM
markj committed rS342887: Stop setting if_linkmib in vlan(4) ifnets..
Stop setting if_linkmib in vlan(4) ifnets.
Wed, Jan 9, 4:47 PM
markj closed D18779: Don't set if_linkmib for vlan(4)..
Wed, Jan 9, 4:47 PM
markj added a comment to D18778: Complete r342182..

Ping?

Wed, Jan 9, 4:34 PM

Tue, Jan 8

markj committed rS342864: Specify the correct option level when emulating SO_PEERCRED..
Specify the correct option level when emulating SO_PEERCRED.
Tue, Jan 8, 5:22 PM
markj committed rS342863: Add termcap entries for TI Silent 703/707 terminals..
Add termcap entries for TI Silent 703/707 terminals.
Tue, Jan 8, 5:08 PM
markj updated the diff for D18779: Don't set if_linkmib for vlan(4)..
  • Also collapse ifv_linkmib into the parent structure.
Tue, Jan 8, 5:02 PM
markj added a reviewer for D18779: Don't set if_linkmib for vlan(4).: network.
Tue, Jan 8, 1:13 AM
markj created D18779: Don't set if_linkmib for vlan(4)..
Tue, Jan 8, 1:13 AM
markj accepted D18767: Handle overflow in calculating max kmem size..
Tue, Jan 8, 1:07 AM
markj added inline comments to D18767: Handle overflow in calculating max kmem size..
Tue, Jan 8, 12:30 AM

Mon, Jan 7

markj updated subscribers of D18758: Refactor skein_block_asm.s to assemble with LLVM integrated assembler.
Mon, Jan 7, 10:50 PM
markj added reviewers for D18778: Complete r342182.: dumbbell, imp.
Mon, Jan 7, 9:48 PM
markj created D18778: Complete r342182..
Mon, Jan 7, 9:47 PM
markj added inline comments to D18767: Handle overflow in calculating max kmem size..
Mon, Jan 7, 5:57 AM
markj accepted D18764: Add a tunable which changes mincore(2) algorithm to only report data from the local mapping..
In D18764#400393, @kib wrote:

I also updated the last sentence in the DESCRIPTION section that tries to explain the '0' sysctl operations. It was very confusing by referencing mappings where the real algorithm examines pages regardless of mappings presence.

Mon, Jan 7, 4:29 AM
markj accepted D18764: Add a tunable which changes mincore(2) algorithm to only report data from the local mapping..
Mon, Jan 7, 3:58 AM
markj accepted D18764: Add a tunable which changes mincore(2) algorithm to only report data from the local mapping..
Mon, Jan 7, 1:30 AM
markj accepted D18764: Add a tunable which changes mincore(2) algorithm to only report data from the local mapping..

The mincore(2) man page should be updated as well.

Mon, Jan 7, 12:55 AM

Sun, Jan 6

markj accepted D18763: Avoid overflow in vtruncbuf().
Sun, Jan 6, 10:11 PM

Sat, Jan 5

markj committed rS342788: Capsicumize rtsol(8) and rtsold(8)..
Capsicumize rtsol(8) and rtsold(8).
Sat, Jan 5, 4:06 PM
markj closed D17572: Run most of rtsold(8) and rtsol(8) in capability mode..
Sat, Jan 5, 4:06 PM
markj committed rS342787: Add a bounds check to the tws(4) passthrough ioctl handler..
Add a bounds check to the tws(4) passthrough ioctl handler.
Sat, Jan 5, 3:28 PM
markj closed D18536: Add bounds checking to the tws(4) passthrough ioctl handler..
Sat, Jan 5, 3:28 PM
markj committed rS342786: MFC r342688:.
MFC r342688:
Sat, Jan 5, 3:10 PM

Fri, Jan 4

markj committed rS342776: Disable savecore(8)'s libcasper support when WITHOUT_DYNAMICROOT=yes..
Disable savecore(8)'s libcasper support when WITHOUT_DYNAMICROOT=yes.
Fri, Jan 4, 7:20 PM
markj added a comment to D18536: Add bounds checking to the tws(4) passthrough ioctl handler..

LGTM (the unlocked use of sc->ioctl_data_mem looks worrisome to me, but the proposed change won't worsen the situation). Do you have a chance to test this on real hardware? (@jpaetzel do you know someone who may be able to help with that?).

My last 9750 died a while ago. I'll ping Austin @ ix to see if he can rig up a system for us to test with.

Ping?

I haven't been deemed worthy of a reply, so I guess that's a no.

Thanks, let's land the change then.

Fri, Jan 4, 6:58 PM
markj added a comment to D18536: Add bounds checking to the tws(4) passthrough ioctl handler..

LGTM (the unlocked use of sc->ioctl_data_mem looks worrisome to me, but the proposed change won't worsen the situation). Do you have a chance to test this on real hardware? (@jpaetzel do you know someone who may be able to help with that?).

My last 9750 died a while ago. I'll ping Austin @ ix to see if he can rig up a system for us to test with.

Fri, Jan 4, 6:42 PM
markj abandoned D18730: Remove excessive invalidations from pmap_remove()..
In D18730#399718, @jhb wrote:

On SMP systems the invalidate_range()'s here would seem to be more efficient since you can batch up the IPI's. I almost wonder if it wouldn't even be better to just do a single invalidate_range at the end instead of dealing with va_next and trying to be perfect about avoiding invalidation of ranges that weren't mapped. The only other call to pmap_remove_l3() in pmap_ts_referenced() is also followed by a call to pmap_invalidate_page(), so I wonder if removing pmap_invalidate_page() wouldn't be the better change?

Fri, Jan 4, 5:59 PM
markj committed rS342768: Support MSG_DONTWAIT in send*(2)..
Support MSG_DONTWAIT in send*(2).
Fri, Jan 4, 5:32 PM
markj closed D18728: Support MSG_DONTWAIT in sendmsg().
Fri, Jan 4, 5:32 PM
markj committed rS342766: Don't enable interrupts in init_secondary()..
Don't enable interrupts in init_secondary().
Fri, Jan 4, 5:15 PM
markj closed D18738: Don't enable interrupts in init_secondary()..
Fri, Jan 4, 5:15 PM