summaryrefslogtreecommitdiffstats
path: root/sys/ia64
Commit message (Collapse)AuthorAgeFilesLines
* Remove 3rd clause, renumber, ok per emailimp2007-01-123-12/+3
|
* Add a lwpid field into per-cpu structure, the lwpid represents currentdavidxu2006-12-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | running thread's id on each cpu. This allow us to add in-kernel adaptive spin for user level mutex. While spinning in user space is possible, without correct thread running state exported from kernel, it hardly can be implemented efficiently without wasting cpu cycles, however exporting thread running state unlikely will be implemented soon as it has to design and stablize interfaces. This implementation is transparent to user space, it can be disabled dynamically. With this change, mutex ping-pong program's performance is improved massively on SMP machine. performance of mysql super-smack select benchmark is increased about 7% on Intel dual dual-core2 Xeon machine, it indicates on systems which have bunch of cpus and system-call overhead is low (athlon64, opteron, and core-2 are known to be fast), the adaptive spin does help performance. Added sysctls: kern.threads.umtx_dflt_spins if the sysctl value is non-zero, a zero umutex.m_spincount will cause the sysctl value to be used a spin cycle count. kern.threads.umtx_max_spins the sysctl sets upper limit of spin cycle count. Tested on: Athlon64 X2 3800+, Dual Xeon 5130
* Threading cleanup.. part 2 of several.julian2006-12-061-5/+3
| | | | | | | | | | | | | | | | | | | | | | Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it. Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable. The ULE scheduler compiles again but I have no idea if it works. The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit. Tested by David Xu, and Dan Eischen using libthr and libpthread.
* Since printf also has at least one critical section, we need tomarcel2006-11-181-5/+7
| | | | | initialize pc_curthread. While here, rename early_pcpu to pcpu0 to be conistent (compare thread0 and proc0).
* Now that printf() needs the PCPU, set it up before we call printf().marcel2006-11-185-26/+16
| | | | | | | | Change the pc_pcb field from a pointer to struct pcb to struct pcb so that sizeof(struct pcb) includes the PCB we use for IPI_STOP. Statically declare early_pcb so that we don't have to allocate the PCB for thread0. This way we can setup the PCPU before cninit() and thus before we use printf().
* Revert previous commit. PC_CONS_BUFR is not used nor needed bymarcel2006-11-181-1/+0
| | | | assembly.
* Fix a comment.ru2006-11-131-1/+1
|
* Make pmap_enter() responsible for setting PG_WRITEABLE insteadalc2006-11-121-0/+2
| | | | | of its caller. (As a beneficial side-effect, a high-contention acquisition of the page queues lock in vm_fault() is eliminated.)
* Add missing includes of priv.h.rwatson2006-11-061-0/+1
|
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-1/+2
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* Remove the KDTRACE option again because of the complaints about havingjb2006-11-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | it as a default. For the record, the KDTRACE option caused _no_ additional source files to be compiled in; certainly no CDDL source files. All it did was to allow existing BSD licensed kernel files to include one or more CDDL header files. By removing this from DEFAULTS, the onus is on a kernel builder to add the option to the kernel config, possibly by including GENERIC and customising from there. It means that DTrace won't be a feature available in FreeBSD by default, which is the way I intended it to be. Without this option, you can't load the dtrace module (which contains the dtrace device and the DTrace framework). This is equivalent to requiring an option in a kernel config before you can load the linux emulation module, for example. I think it is a mistake to have DTrace ported to FreeBSD, but not to have it available to everyone, all the time. The only exception to this is the companies which distribute systems with FreeBSD embedded. Those companies will customise their systems anyway. The KDTRACE option was intended for them, and only them.
* Build in kernel support for loading DTrace modules by default. Thisjb2006-11-041-0/+3
| | | | | | | | | | | | | | adds the hooks that DTrace modules register with, and adds a few functions which have the dtrace_ prefix to allow the DTrace FBT (function boundary trace) provider to avoid tracing because they are called from the DTtrace probe context. Unlike other forms of tracing and debug, DTrace support in the kernel incurs negligible run-time cost. I think the only reason why anyone wouldn't want to have kernel support enabled for DTrace would be due to the license (CDDL) under which DTrace is released.
* Make sure kern_envp is never NULL. If we don't get a pointer tomarcel2006-11-031-3/+4
| | | | the environment from the loader, use the static environment.
* Add a cnputs() function to write a string to the console withjb2006-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | a lock to prevent interspersed strings written from different CPUs at the same time. To avoid putting a buffer on the stack or having to malloc one, space is incorporated in the per-cpu structure. The buffer size if 128 bytes; chosen because it's the next power of 2 size up from 80 characters. String writes to the console are buffered up the end of the line or until the buffer fills. Then the buffer is flushed to all console devices. Existing low level console output via cnputc() is unaffected by this change. ithread calls to log() are also unaffected to avoid blocking those threads. A minor change to the behaviour in a panic situation is that console output will still be buffered, but won't be written to a tty as before. This should prevent interspersed panic output as a number of CPUs panic before we end up single threaded running ddb. Reviewed by: scottl, jhb MFC after: 2 weeks
* Remove the KSE option now that it's in DEFAULTS on these arches/machines.jb2006-10-261-1/+0
| | | | | | | | | The 'nooption' kernel config entry has to be used to turn KSE off now. This isn't my preferred way of dealing with this, but I'll defer to scottl's experience with the io/mem kernel option change and the grief experienced over that. Submitted by: scottl@
* Add 'options KSE' to the kernel config DEFAULTS on all arches/machinesjb2006-10-261-0/+2
| | | | | | | | | | | except sun4v. This change makes the transition from a default to an option more transparent and is an attempt to head off all the compliants that are likely from people who don't read UPDATING, based on experience with the io/mem change. Submitted by: scottl@
* Make KSE a kernel option, turned on by default in all GENERICjb2006-10-263-0/+7
| | | | | | | kernel configs except sun4v (which doesn't process signals properly with KSE). Reviewed by: davidxu@
* Move "device splash" back to MI NOTES and "files", it's MI.ru2006-10-231-2/+0
|
* o Eliminate nexus_print_resources(). Use resource_list_print_type()marcel2006-10-231-50/+5
| | | | | | instead. o Eliminate nexus_print_all_resources(). Inline the function body in nexus_print_child().
* Eliminate unnecessary PG_BUSY tests.alc2006-10-221-1/+1
|
* Move more MD devices and options out of MI NOTES.des2006-10-201-3/+57
|
* The VGA_DEBUG option only exists on {amd64,i386,ia64}.des2006-10-201-0/+3
| | | | Also remove 'device io' from amd64 NOTES; DEFAULTS takes care of it.
* Fix previous revision:marcel2006-10-191-2/+2
| | | | | | o day and mday are the same. No need to subtract 1 from mday. o Set dow to -1 as clock_ct_to_ts() checks this field and returns EINVAL on any day of the week but Sunday.
* o Add keyword volatile for user mutex owner field.davidxu2006-10-171-4/+4
| | | | | | o Fix type consistent problem by using type long for old umtx and wait channel. o Rename casuptr to casuword.
* Add a newline to the printf().hrs2006-10-151-1/+1
| | | | | Spotted by: Peter Carah <pete@altadena.net> MFC after: 3 days
* Include freebsd32_signal.h now that signal-related definitions aremarcel2006-10-061-0/+1
| | | | | | moved there. Found by: ia64 tinderbox.
* - Remove SCHED_ULE from GENERIC to better avoid foot-shooting bysimon2006-10-051-1/+0
| | | | | | | | | | | unsuspecting users. - Add a comment in NOTES about experimental status of SCHED_ULE. - Make warning about experimental status in sched_ule(4) a bit stronger. Suggested and reviewed by: dougb Discussed on: developers MFC after: 3 days
* PR:jb2006-10-041-86/+0
| | | | | | | | | | | | | | Submitted by: Reviewed by: Approved by: Obtained from: MFC after: Security: Move the relocation definitions to the common elf header so that DTrace can use them on one architecture targeted to a different one. Add the additional ELF types defines in Sun's "Linker and Libraries" manual.
* Use calendrical calculations from subr_clock.c instead of home-rolled.phk2006-10-021-68/+26
|
* Second part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-021-25/+0
| | | | | | | | | | | Split subr_clock.c in two parts (by repo-copy): subr_clock.c contains generic RTC and calendaric stuff. etc. subr_rtc.c contains the newbus'ified RTC interface. Centralize the machdep.{adjkerntz,disable_rtc_set,wall_cmos_clock} sysctls and associated variables into subr_clock.c. They are not machine dependent and we have generic code that relies on being present so they are not even optional.
* First part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-022-4/+1
| | | | | | Move relevant variables to <sys/clock.h> and fix #includes as necessary. Use libkern's much more time- & spamce-efficient BCD routines.
* Added COMPAT_FREEBSD6 option.ru2006-09-261-0/+1
|
* Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoleteskan2006-09-211-1/+1
| | | | | the former and __builtin_va_start was present in all GCC version 3.1 and later.
* Add audit hooks for ppc, ia64 system call paths.rwatson2006-09-162-0/+8
| | | | | | Reviewed by: marcel (ia64) Obtained from: TrustedBSD Project MFC after: 3 days
* Implement casuword32, compare and set user integer, thank Marcel Moolenarrdavidxu2006-08-281-0/+50
| | | | who wrote the IA64 version of casuword32.
* Eliminate unused definitions. (They came from NetBSD.)alc2006-08-251-8/+0
| | | | Discussed with: cognet, grehan, marcel
* First pass at allowing memory to be mapped using cache modes other thanjhb2006-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | WB (write-back) on x86 via control bits in PTEs and PDEs (including making use of the PAT MSR). Changes include: - A new pmap_mapdev_attr() function for amd64 and i386 which takes an additional parameter (relative to pmap_mapdev()) specifying the cache mode for this mapping. Note that on amd64 only WB mappings are done with the direct map, all other modes result in a private mapping. - pmap_mapdev() on i386 and amd64 now defaults to using UC (uncached) mappings rather than WB. Previously we relied on the BIOS setting up MTRR's to enforce memio regions being treated as UC. This might make hw.cbb_start_memory unnecessary in some cases now for example. - A new pmap_mapbios()/pmap_unmapbios() API has been added to allow places that used pmap_mapdev() to map non-device memory (such as ACPI tables) to do so using WB as before. - A new pmap_change_attr() function for amd64 and i386 that changes the caching mode for a range of KVA. Reviewed by: alc
* Complete the transition from pmap_page_protect() to pmap_remove_write().alc2006-08-011-34/+37
| | | | | | | | | | | | | Originally, I had adopted sparc64's name, pmap_clear_write(), for the function that is now pmap_remove_write(). However, this function is more like pmap_remove_all() than like pmap_clear_modify() or pmap_clear_reference(), hence, the name change. The higher-level rationale behind this change is described in src/sys/amd64/amd64/pmap.c revision 1.567. The short version is that I'm trying to clean up and fix our support for execute access. Reviewed by: marcel@ (ia64)
* Remove sio(4) and related options from MI files to amd64, i386marcel2006-07-291-3/+0
| | | | | | | | | and pc98 MD files. Remove nodevice and nooption lines specific to sio(4) from ia64, powerpc and sparc64 NOTES. There were no such lines for arm yet. sio(4) is usable on less than half the platforms, not counting a future mips platform. Its presence in MI files is therefore increasingly becoming a burden.
* Retire SYF_ARGMASK and remove both SYF_MPSAFE and SYF_ARGMASK. sy_narg isjhb2006-07-282-3/+3
| | | | now back to just being an argument count.
* Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used tojhb2006-07-282-22/+1
| | | | | | | | | mark system calls as being MPSAFE: - Stop conditionally acquiring Giant around system call invocations. - Remove all of the 'M' prefixes from the master system call files. - Remove support for the 'M' prefix from the script that generates the syscall-related files from the master system call files. - Don't explicitly set SYF_MPSAFE when registering nfssvc.
* Unify the checking for lock misbehavior in the various syscall()jhb2006-07-272-14/+26
| | | | | | | | | | | | | | implementations and adjust some of the checks while I'm here: - Add a new check to make sure we don't return from a syscall in a critical section. - Add a new explicit check before userret() to make sure we don't return with any locks held. The advantage here is that we can include the syscall number and name in syscall() whereas that info is not available in userret(). - Drop the mtx_assert()'s of sched_lock and Giant. They are replaced by the more general checks just added. MFC after: 2 weeks
* Add KTR_SYSC tracing to the syscall() implementations that didn't have itjhb2006-07-272-0/+15
| | | | | | yet. MFC after: 1 week
* Add missing ptrace(2) system-call stops to various syscall()jhb2006-07-271-0/+5
| | | | | | implementations. MFC after: 1 week
* Move default GEOM classes from files.ia64, where they were markedmarcel2006-07-171-0/+5
| | | | standard, to the DEFAULTS file.
* Simplify the pager support in DDB. Allowing different db commands tojhb2006-07-121-4/+2
| | | | | | | | | | | | | | | | install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
* Make the firmware assist driver resident inmjacob2006-07-091-0/+1
| | | | preparation for isp using it.
* Fixed FP_R*. fp{get_set}round() apparently never worked on ia64, sincebde2006-07-051-5/+5
| | | | | | the alpha values were used and are quite different. Fixed some style bugs by copying from the i386 version where it is better.
* Partial support for branch long emulation. This only emulates themarcel2006-06-293-1/+111
| | | | | branch long jump and not the branch long call. Support for that is forthcoming.
* Make several changes to pmap_enter_quick_locked():alc2006-06-271-20/+39
| | | | | | | | | | | | | | | | | | 1. Make the caller responsible for performing pmap_install(). This reduces the number of times that pmap_install() is performed by pmap_enter_object() from twice per page to twice overall. 2. Don't block if pmap_find_pte() is unable to allocate a PTE. If it did block, then it might wind up mapping a cache page. Specifically, if pmap_enter_quick_locked() slept when called from pmap_enter_object(), the page daemon could change an active or inactive page into a cache page just before it was to be mapped. 3. Bail out of pmap_enter_quick_locked() if pv entries aren't plentiful. In other words, don't force the allocation of a pv entry if they aren't readily available. Reviewed by: marcel@
OpenPOWER on IntegriCloud