Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] FreeBSD PREEMPTION (was: empty rows (PostgreSQL))
- Date: Mon, 14 Feb 2005 13:05:18 -0500
- From: Josh Glover <jmglov@example.com>
- Subject: Re: [tlug] FreeBSD PREEMPTION (was: empty rows (PostgreSQL))
- References: <20050211133733.5e61c59e.qqw99xk9@example.com> <603570.1108100914920.JavaMail.babayoshihiko@example.com> <20050211062752.GA2179@example.com> <d8fcc08005021108145c6baa79@example.com> <20050211171839.GB2179@example.com> <87braokftm.fsf@example.com> <20050214054822.GC2179@example.com> <87fyzz2tkr.fsf@example.com> <d8fcc08005021407098dc9b4a@example.com> <20050214161246.GA11505@example.com>
On Mon, 14 Feb 2005 11:12:46 -0500, Scott Robbins <scottro@example.com> wrote: > Anyone put the SCHED_ULE and PREEMPTION in a FreeBSD 5.3-STABLE kernel > on a box with a heavy load? I've put it in, seen no noticeable > difference, but I don't have anything really doing much with it. Well, I would expect that the PREEMPTION option turns on kernel thread preemption (please correct me if I am wrong here, wileyc), so it would be expected to make things better for only a specific case of heavy loads: where the load is caused by a lot of competing processes making lengthy kernel calls. I am going quite far out on a limb here, since I have no bloody idea what the BSD kernel looks like, but if it is anything like Linux (which I rather suspect that it is, at least in a zoomed-out architectural view), this is how things work: 1. A userland process, such a Apache, calls, for example, open(2) 2. The C library actually makes the system call 3. Now we are in kernel space for the duration of the call 4. The kernel processes the system call 5. Now we return to userland 6. The userland process executes its next instruction In a non-preemptible kernel, a context switch to another process can only occur: - Before or after step (1) - Before step (2) - After step (5) - Before or after step (6) In a preemptible kernel, a contect switch can occur after any instruction, even in kernel mode! The goal of this is to make interactive stuff more responsive even when the kernel is also servicing lots of other processes. Have I got it nearly right? -Josh
- Follow-Ups:
- Re: [tlug] FreeBSD PREEMPTION (was: empty rows (PostgreSQL))
- From: Scott Robbins
- References:
- [tlug] empty rows (PostgreSQL)
- From: Ahmed Sarwar
- Re: [tlug] empty rows (PostgreSQL)
- From: BABA Yoshihiko
- Re: [tlug] empty rows (PostgreSQL)
- From: Edward Wright
- Re: [tlug] empty rows (PostgreSQL)
- From: Josh Glover
- Re: [tlug] empty rows (PostgreSQL)
- From: Edward Wright
- Re: [tlug] empty rows (PostgreSQL)
- From: Stephen J. Turnbull
- Re: [tlug] empty rows (PostgreSQL)
- From: Edward Wright
- Re: [tlug] empty rows (PostgreSQL)
- From: Stephen J. Turnbull
- Re: [tlug] empty rows (PostgreSQL)
- From: Josh Glover
- Re: [tlug] empty rows (PostgreSQL)
- From: Scott Robbins
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] empty rows (PostgreSQL)
- Next by Date: Re: [tlug] FreeBSD PREEMPTION (was: empty rows (PostgreSQL))
- Previous by thread: Re: [tlug] empty rows (PostgreSQL)
- Next by thread: Re: [tlug] FreeBSD PREEMPTION (was: empty rows (PostgreSQL))
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links