the PMCs are system-wide, fine-grained and more tunable by the user.
We don't do application tracking, since it would require to store the PMC
values in mdproc and starting/stopping the counters on each context switch.
While this doesn't seem to be particularly difficult to achieve, I don't
think it is really interesting; and if someone really wants to measure
the performance of an application, they can simply schedctl it to a cpu
and look at the PMC results for this cpu.
Note that several options are implemented but not yet used.
"really unmap the gap between the text and data rather than just removing
all access with mprotect(). the latter results in the kernel having to
keep track of that range separately since the permissions are different.
avoid calling mmap() with a size of zero."
As per toolchain/52054: src/libexec/ld.elf_so update breaks everything,
this commit is very broken for some people (but not others). chs mentioned
he has a fix, but best not to leave -current broken in the meantime.
- pass a DMA tag. Won't work but at least we don't crash anymore
TODO:
- magic number reduction. Seriously.
- figure out why DMA doesn't work
with this cards that don't need DMA or more than 1MB of MMIO space should work
Reviewed by enami@. Tested by Naruaki Etomi and me.
A 68k LUNA with this driver will be demonstrated at AsiaBSDCon NetBSD booth
by Etomi-san, with LUNA-88K2 running OpenBSD/luna88k by Kenji Aoyama.
Assert it, too, and don't handle other cases.
We can add the assertion to ttm_agp_tt_unpopulate because it is called by
{nouveau,radeon}_ttm_tt_unpopulate, which is generically called
ttm_tt_unpopulate.
And the sole caller to ttm_tt_unpopulate (ttm_tt_destroy) only does so if the
state is unbound. the other caller is in a !NetBSD block.
We can add the assertion to ttm_agp_tt_populate and avoid handling the
!unpopulated case because the sole callers are {nouveau,radeon}_ttm_tt_populate
both of which return early in the !unpopulated case.
We can change the assertion on ttm_tt_wire because it is solely called by
ttm_bus_dma_populate, which already asserts that it is the unpopulated case.
from riastradh
unpopulated case.
All callers of ttm_bus_dma_populate (ttm_agp_tt_populate,
radeon_ttm_tt_populate, nouveau_ttm_tt_populate) return early if it isn't
unpopulated.
from riastradh@
all access with mprotect(). the latter results in the kernel having to
keep track of that range separately since the permissions are different.
avoid calling mmap() with a size of zero.
and succeed in allocating some pages but fail to get them all,
free any ptps we did allocate before returning.
also, only consume kernel-reserve pages if pmap_enter()
is called without PMAP_CANFAIL set, to help avoid deadlocking
during high memory pressure.
* Use markers to reduce false sharing.
* Remove XENDEBUG_SYNC and several debug messages, they are just useless.
* Remove xen_vcpu_*. They are unused and not optimized: if we really
wanted to flush ranges we should pack the VAs in a mmuext_op array
instead of performing several hypercalls in a loop.
* Start removing PG_k.
* KNF, reorder, simplify and remove stupid comments.