Page MenuHomeFreeBSD

markj (Mark Johnston)
User

Projects

User Details

User Since
Mar 12 2014, 1:00 AM (288 w, 3 d)

Recent Activity

Yesterday

markj accepted D21685: Try translating the fault address with pmap unlocked..
Fri, Sep 20, 3:25 PM

Wed, Sep 18

markj added a comment to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..

I think I've brought this up before, but I would like it if the VM had a generic per-2MB page structure. We already have several in vm_reserv and the pmap, and IMO it would be a good place to maintain a "compound" busy state, rather than in the object. I worry that a mechanism to block the busying of all pages in an object will inhibit concurrency and lead to transient latency spikes. I don't object to the current approach though.

Wed, Sep 18, 10:48 PM
markj added inline comments to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..
Wed, Sep 18, 10:40 PM
markj added inline comments to D21592: (vm object 3) Add a shared object busy synchronization mechanism that blocks new page busy acquires while held..
Wed, Sep 18, 10:17 PM
markj added a comment to D21669: mtod macro: Drop the type argument.
In D21669#473159, @cem wrote:

Both remarks seem reasonable to me. I wasn’t going to drop this in the tree without circulating the idea past net@ at a minimum 😀. But I wanted some feedback from a smaller audience first— thank you both.
One additional possibility would be to define mtod in such a way that either 1 or 2 argument versions continue to compile, as an easier onramp for out of tree consumers. (I believe this is possible but haven’t yet confirmed so.) It would be an ugly macro hack, but importantly the ugliness would just be in one place. If that is possible, do either of you have an opinion on whether that seems worse or better than requiring a flag day for out of tree consumers?

Wed, Sep 18, 6:25 PM
markj accepted D21531: Use zlib's uncompress function for simpler code..
Wed, Sep 18, 2:35 PM

Tue, Sep 17

markj added a comment to D21669: mtod macro: Drop the type argument.

I have no objections to the change in principle, it's a nice cleanup. It would cause a massive amount of churn: we have about 2000 uses of mtod() in the tree, and downstream trees will have many thousands more. I think such a change deserves a wider discussion on -arch or so.

Tue, Sep 17, 3:31 PM
markj added a comment to D21685: Try translating the fault address with pmap unlocked..

I don't see why this is sufficient. If the unlocked translation attempt fails, e.g., because the mapping is being promoted or demoted a second time, we may still attempt to acquire a mutex in a scenario where that is not allowed.

Tue, Sep 17, 2:33 PM
markj added a reviewer for D21685: Try translating the fault address with pmap unlocked.: alc.
Tue, Sep 17, 2:33 PM

Mon, Sep 16

markj committed rS352419: MFC r351613:.
MFC r351613:
Mon, Sep 16, 6:40 PM
markj committed rS352412: MFC r351727:.
MFC r351727:
Mon, Sep 16, 3:22 PM
markj accepted D21661: Support EARLY_AP_STARTUP on RISC-V.
Mon, Sep 16, 3:17 PM
markj committed rS352411: Assert that the refcount value is not VPRC_BLOCKED in vm_page_drop()..
Assert that the refcount value is not VPRC_BLOCKED in vm_page_drop().
Mon, Sep 16, 3:17 PM
markj committed rS352410: Fix a race in vm_page_dequeue_deferred_free() after r352110..
Fix a race in vm_page_dequeue_deferred_free() after r352110.
Mon, Sep 16, 3:12 PM
markj committed rS352409: Fix a page leak in vm_page_reclaim_run()..
Fix a page leak in vm_page_reclaim_run().
Mon, Sep 16, 3:09 PM
markj closed D21639: Fix some issues with r352110..
Mon, Sep 16, 3:07 PM
markj committed rS352408: Fix a couple of nits in r352110..
Fix a couple of nits in r352110.
Mon, Sep 16, 3:06 PM
markj committed rS352407: Revert r352406, which contained changes I didn't intend to commit..
Revert r352406, which contained changes I didn't intend to commit.
Mon, Sep 16, 3:05 PM
markj committed rS352406: Fix a couple of nits in r352110..
Fix a couple of nits in r352110.
Mon, Sep 16, 3:03 PM
markj added a comment to D21642: Remove more unused identifiers from r351198..
In D21642#472503, @alc wrote:

Yes, I put the const in the wrong place. So, code within vm_page.c will avoid the dereference, but code outside vm_page.c that uses the declaration from vm_page.h will still perform the dereference. Declaring vm_page_array as an array would deal with both cases.

Mon, Sep 16, 2:42 PM
markj added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.
In D21658#472502, @mjg wrote:

I already noted pmcstat needs serious help. I think adding this with (the optional key swap) is solves the immediate problem of not having the feature while not having to spend a significant amount of time writing a new tool from scratch.

Mon, Sep 16, 2:57 AM

Sun, Sep 15

markj added a comment to D21642: Remove more unused identifiers from r351198..
In D21642#472496, @alc wrote:
In D21642#472450, @alc wrote:

We could go further and make vm_page_array a const pointer on amd64, ...

If you start down this path, I would go a step further: Declare vm_page_array as an array, instead of a pointer, and define the symbol's value to VM_MIN_KERNEL_ADDRESS. This would eliminate the memory dereference to retrieve the start of the array.

Sorry, I don't quite see what you are proposing. My suggestion also eliminated the memory dereference, but I don't see how declaring vm_page_array as an array would help anything.

I'm afraid not. Consider this simplified example.

const int *ptr = (int *)0x10000000;
...
Sun, Sep 15, 8:21 PM
markj added a comment to D21642: Remove more unused identifiers from r351198..
In D21642#472450, @alc wrote:

We could go further and make vm_page_array a const pointer on amd64, ...

If you start down this path, I would go a step further: Declare vm_page_array as an array, instead of a pointer, and define the symbol's value to VM_MIN_KERNEL_ADDRESS. This would eliminate the memory dereference to retrieve the start of the array.

Sun, Sep 15, 7:55 PM
markj added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.
In D21658#472473, @mjg wrote:

I think pmcstat needs serious help and the compatibility change (which I highly doubt hurts anyone) is a step towards that goal. I want a usable tool without the need to rewrite current one, if it can be helped. Should someone want to write something new from scratch I'm happy to see it, but I don't want to the work myself.

Sun, Sep 15, 6:53 PM
markj accepted D21664: Fix handling of Hop-by-Hop options over the loopback interface.
Sun, Sep 15, 6:08 PM
markj added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.
In D21658#472446, @mjg wrote:

The option was added at my request and highly doubt anyone else is using it (including the big user). I highly doubt any user will get upset over this change, but worst case I can drop the swap.

Sun, Sep 15, 5:46 PM
markj added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.
In D21658#472440, @mjg wrote:

I think it fits better. 'A' for address, 'I' for instruction. If there is a time to change it, it is now. I would not do it if pmcstat was actually in widespread use and people had the opt ingrained in their fingers.

Sun, Sep 15, 5:30 PM
markj added inline comments to D21642: Remove more unused identifiers from r351198..
Sun, Sep 15, 5:00 PM
markj updated the diff for D21642: Remove more unused identifiers from r351198..

Restore lost comment.

Sun, Sep 15, 4:59 PM
markj added inline comments to D21664: Fix handling of Hop-by-Hop options over the loopback interface.
Sun, Sep 15, 4:57 PM
markj added a comment to D21658: pmcstat: implement showing offsets into symbols in top mode.

Why did you change the meaning of -I instead of putting the new functionality under a new option?

Sun, Sep 15, 4:54 PM

Fri, Sep 13

markj added inline comments to D21541: debugnet(4): Add optional full-duplex mode.
Fri, Sep 13, 9:47 PM
markj added inline comments to D21541: debugnet(4): Add optional full-duplex mode.
Fri, Sep 13, 9:43 PM
markj accepted D20324: Introduce the ARB tree(3) macros.

I have no objection to this with a separate header and man page. It does seem convenient to have a map structure that can be copied with memcpy() or copyout() or so.

Fri, Sep 13, 9:37 PM
markj added inline comments to D21541: debugnet(4): Add optional full-duplex mode.
Fri, Sep 13, 8:57 PM
markj added inline comments to D21645: riscv trap_pfault: remove unneeded hold of the process around vm_fault() call..
Fri, Sep 13, 8:09 PM
markj accepted D21482: debugnet(4): Infer non-server connection parameters.
Fri, Sep 13, 7:59 PM
markj accepted D21645: riscv trap_pfault: remove unneeded hold of the process around vm_fault() call..
Fri, Sep 13, 7:42 PM
markj accepted D21627: Implement a close_range(2) syscall.
Fri, Sep 13, 7:17 PM
markj added inline comments to D17011: hwpmc: Refactor sample ring buffer handling.
Fri, Sep 13, 7:09 PM
markj added inline comments to D21642: Remove more unused identifiers from r351198..
Fri, Sep 13, 6:45 PM
markj updated the diff for D21642: Remove more unused identifiers from r351198..
  • Remove PMAP_PA_ADDRESS.
Fri, Sep 13, 6:45 PM
markj updated the summary of D21642: Remove more unused identifiers from r351198..
Fri, Sep 13, 6:02 PM
markj updated the summary of D21642: Remove more unused identifiers from r351198..
Fri, Sep 13, 6:01 PM
markj created D21642: Remove more unused identifiers from r351198..
Fri, Sep 13, 6:01 PM
markj added inline comments to D21627: Implement a close_range(2) syscall.
Fri, Sep 13, 5:52 PM
markj updated the test plan for D21639: Fix some issues with r352110..
Fri, Sep 13, 5:39 PM
markj created D21639: Fix some issues with r352110..
Fri, Sep 13, 5:39 PM
markj added inline comments to D21627: Implement a close_range(2) syscall.
Fri, Sep 13, 4:32 PM
markj added a comment to D21617: Improve support for refcount waiting.
In D21617#471544, @mjg wrote:

I don't care for the name for the most part, but perhaps something not sounding so refcounty will make it easier to not accidentally use the wrong API. Alternatively, perhaps it's time we de-u_int all consumers and have something of this sort:

struct refcount {
    u_int count;
};

with open-coded access prohibited.

Fri, Sep 13, 4:08 PM
markj added a comment to D21617: Improve support for refcount waiting.
In D21617#471527, @mjg wrote:

So I had a closer look and think that the introduction of support for waiting was an abuse of this API and should either be moved to another one or get dedicated routines in this one. Most consumers (including very frequently used ones like struct file) don't care for it and avoidably pay the price for its existence.

  1. there is a refcount_wake unnecessary scattered, but hopefully most of the time it is only at the end of the func and has to be jumped to
  2. the range is halved because of the bit needed to know if there are waiters. this means various consumers will have to switch 32 -> 64 bit sooner or abandon the API in the first place

That said, I suggest a different namespace (refcountw?) for this and reverting refcount.h to pre-r351188.

Fri, Sep 13, 3:58 PM
markj added inline comments to D21629: Add support for multithreading the inactive queue pageout within a domain..
Fri, Sep 13, 2:58 PM
markj added inline comments to D21627: Implement a close_range(2) syscall.
Fri, Sep 13, 1:43 PM
markj closed D20486: Change synchonization rules for page reference counting..
Fri, Sep 13, 1:19 PM
markj added inline comments to D21629: Add support for multithreading the inactive queue pageout within a domain..
Fri, Sep 13, 12:03 AM

Thu, Sep 12

markj updated the diff for D21611: Introduce atomic per-page queue state operations..

Address most of the feedback from Jeff.

Thu, Sep 12, 10:57 PM
markj added inline comments to D21611: Introduce atomic per-page queue state operations..
Thu, Sep 12, 10:15 PM
markj added inline comments to D21611: Introduce atomic per-page queue state operations..
Thu, Sep 12, 10:13 PM
markj committed rS352256: Remove a redundant NULL pointer check in cpuset_modify_domain()..
Remove a redundant NULL pointer check in cpuset_modify_domain().
Thu, Sep 12, 4:47 PM
markj added a comment to D21361: sys/vm/vm_glue.c: Incorrect function name in panic string..

Any reason not to commit this?

Thu, Sep 12, 4:29 PM
markj added inline comments to D21617: Improve support for refcount waiting.
Thu, Sep 12, 4:25 PM
markj accepted D21620: Use REFCOUNT_COUNT() to obtain refcount where appropriate.

Does this fix an observed bug? The waiter bit should only be set if the counter value is non-zero, so the comparisons with 0 should work correctly regardless. I agree with the change though.

Thu, Sep 12, 4:08 PM
markj closed D21602: Update to ftp/netdumpd 20190910..
Thu, Sep 12, 3:41 PM
markj committed rP511887: ftp/netdumpd: Update to 20190910.
ftp/netdumpd: Update to 20190910
Thu, Sep 12, 3:41 PM
markj updated the summary of D21611: Introduce atomic per-page queue state operations..
Thu, Sep 12, 12:08 AM
markj updated the test plan for D21611: Introduce atomic per-page queue state operations..
Thu, Sep 12, 12:02 AM

Wed, Sep 11

markj created D21611: Introduce atomic per-page queue state operations..
Wed, Sep 11, 11:57 PM

Tue, Sep 10

markj added a comment to D21460: Add ddb(4) 'netdump' command to netdump a core without preconfiguration.
In D21460#470271, @cem wrote:

@markj I've moved over discussion of netdump_configure() / CURVNET / etc from D21482 to here. I'll admit I don't understand VNETs at all, so I'm pretty naive about what is reasonable where. Given you have some idea of what the right thing to do is, I'm totally happy to do just do that.

Tue, Sep 10, 11:42 PM
markj added inline comments to D21482: debugnet(4): Infer non-server connection parameters.
Tue, Sep 10, 11:27 PM
markj added a reviewer for D21602: Update to ftp/netdumpd 20190910.: bdrewery.
Tue, Sep 10, 11:19 PM
markj created D21602: Update to ftp/netdumpd 20190910..
Tue, Sep 10, 11:19 PM
markj accepted D21549: (vm object 2) Don't release xbusy in vm_page_remove(), defer to vm_page_free_prep()..
Tue, Sep 10, 8:58 PM
markj added inline comments to D20486: Change synchonization rules for page reference counting..
Tue, Sep 10, 2:50 PM
markj added a comment to D21566: Improve MD page fault handlers..
In D21566#470372, @kib wrote:

The change LGTM. I would consider keeping the vm_fault() wrapper for vm_fault_hold(), to avoid churn if vm_fault_hold() ever needs to grow additional arguments.

There is only one caller of vm_fault() outside of the trap_pfault()s. Note that vm_map_wire() use of vm_fault() caused ktrace recording the wired pages, which IMO is not right.

Tue, Sep 10, 2:47 PM
markj added a comment to D21566: Improve MD page fault handlers..

The change LGTM. I would consider keeping the vm_fault() wrapper for vm_fault_hold(), to avoid churn if vm_fault_hold() ever needs to grow additional arguments.

Tue, Sep 10, 2:10 PM
markj accepted D21460: Add ddb(4) 'netdump' command to netdump a core without preconfiguration.

The comment I made in D21482 about configuration from outside vnet0 really belongs here, but the change otherwise LGTM.

Tue, Sep 10, 12:43 AM
markj added inline comments to D21482: debugnet(4): Infer non-server connection parameters.
Tue, Sep 10, 12:42 AM

Mon, Sep 9

markj added inline comments to D21566: Improve MD page fault handlers..
Mon, Sep 9, 11:51 PM
markj added a comment to D21510: ddb(4): Add 'show route <dest>' and 'show routetable [<af>]'.
In D21510#470181, @cem wrote:

Any objection in principle? Planning to review or ENOTIME? Suggestions for reviewers with free time and interest in this layer of the network stack?

Mon, Sep 9, 10:11 PM
markj committed rS352110: Change synchonization rules for vm_page reference counting..
Change synchonization rules for vm_page reference counting.
Mon, Sep 9, 9:33 PM

Sun, Sep 8

markj committed rS352047: Release mhorne..
Release mhorne.
Sun, Sep 8, 9:21 PM
markj committed rS352046: MFC r351361, r351363:.
MFC r351361, r351363:
Sun, Sep 8, 8:53 PM
markj added inline comments to D21392: [2/3] Add an initial seal argument to kern_shm_open() .
Sun, Sep 8, 8:52 PM
markj accepted D21392: [2/3] Add an initial seal argument to kern_shm_open() .
Sun, Sep 8, 8:46 PM
markj committed rS352045: MFC r351671:.
MFC r351671:
Sun, Sep 8, 8:43 PM
markj committed rS352044: MFC r351624:.
MFC r351624:
Sun, Sep 8, 8:42 PM
markj committed rS352043: MFC r351613:.
MFC r351613:
Sun, Sep 8, 8:42 PM
markj committed rS352042: MFC r351573:.
MFC r351573:
Sun, Sep 8, 8:41 PM
markj committed rS352041: MFC r351672:.
MFC r351672:
Sun, Sep 8, 8:40 PM
markj committed rS352040: MFC r351332:.
MFC r351332:
Sun, Sep 8, 8:39 PM
markj committed rS352039: MFC r350431:.
MFC r350431:
Sun, Sep 8, 8:37 PM
markj committed rS352038: MFC r351547, r351549:.
MFC r351547, r351549:
Sun, Sep 8, 8:28 PM
markj added inline comments to D21549: (vm object 2) Don't release xbusy in vm_page_remove(), defer to vm_page_free_prep()..
Sun, Sep 8, 8:05 PM
markj accepted D21255: Remove the page lock dependency on busy sleeps by using sleepq to avoid races..
Sun, Sep 8, 8:04 PM
markj accepted D21437: Fix compilation of locore.S with clang.

Approved.

Sun, Sep 8, 7:48 PM
markj accepted D21531: Use zlib's uncompress function for simpler code..
Sun, Sep 8, 4:14 PM
markj accepted D21509: ddb(4): Add some support for lexing IPv6 addresses.
Sun, Sep 8, 4:01 PM
markj accepted D21459: ddb(4): Enhance functionality for specialized ddb commands.

Sorry for the delay.

Sun, Sep 8, 3:57 PM

Sat, Sep 7

markj accepted D21560: Collection of fixes for exec/v_writecount handling..
Sat, Sep 7, 2:42 PM
markj added inline comments to D21560: Collection of fixes for exec/v_writecount handling..
Sat, Sep 7, 1:32 PM