History log of /freebsd-10-stable/sys/kern/kern_synch.c
Revision Date Author Comments
# 337035 01-Aug-2018 hselasky

MFC r330344:
Correct the return code from pause() during cold startup from zero to
EWOULDBLOCK. This also matches the description in pause(9).

Discussed with: kib@
Sponsored by: Mellanox Technologies


# 337034 01-Aug-2018 hselasky

MFC r330349 and r330362:

Allow pause_sbt() to catch signals during sleep by passing C_CATCH flag.
Define pause_sig() function macro helper similarly to other kernel functions
which catch signals. Update outdated function description.

Document pause_sig(9) and update prototypes for existing pause(9) and
pause_sbt(9) functions.

Discussed with: kib@
Suggested by: cem@
Sponsored by: Mellanox Technologies


# 316843 14-Apr-2017 avg

MFC r315960: dtrace sched:::preempt should fire only when there is preemption


# 316841 14-Apr-2017 avg

MFC r315851: move thread switch tracing from mi_switch to sched_switch


# 314667 04-Mar-2017 avg

MFC r283291: don't use CALLOUT_MPSAFE with callout_init()

The main purpose of this MFC is to reduce conflicts for other merges.
Parts of the original change have already "trickled down" via individual MFCs.


# 308470 09-Nov-2016 kib

MFC r308228:
Remove remnants of the recursive sleep support.


# 301261 03-Jun-2016 hselasky

MFC r300489:
Use DELAY() instead of _sleep() when SCHEDULER_STOPPED() is set inside
pause_sbt(). This allows pause() to continue working during a panic()
which is not invoking KDB. This is useful when debugging graphics
drivers using the LinuxKPI.


# 284021 05-Jun-2015 kib

MFC r283735:
Remove several write-only variables.


# 273736 27-Oct-2014 hselasky

MFC r263710, r273377, r273378, r273423 and r273455:

- De-vnet hash sizes and hash masks.
- Fix multiple issues related to arguments passed to SYSCTL macros.

Sponsored by: Mellanox Technologies


# 271769 18-Sep-2014 dumbbell

vt(4): Merge several bug fixes and improvements

SVN revisions in this MFC:
269779 270705 270706 271180 271250 271253 271682 271684

Detailed commit list:

r269779:
fbd: Fix a bug where vt_fb_attach() success would be considered a failure

vt_fb_attach() currently always returns 0, but it could return a code
defined in errno.h. However, it doesn't return a CN_* code. So checking
its return value against CN_DEAD (which is 0) is incorrect, and in this
case, a success becomes a failure.

The consequence was unimportant, because the caller (drm_fb_helper.c)
would only log an error message in this case. The console would still
work.

Approved by: nwhitehorn

r270705:
vt(4): Add cngrab() and cnungrab() callbacks

They are used when a panic occurs or when entering a DDB session for
instance.

cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.

r270706:
drm: Don't "taskqueue" vt-switch if under DDB/panic situation

If DDB is active, we can't use a taskqueue thread to switch away from
the X window, because this thread can't run.

Reviewed by: ray@
Approved by: ray@

r271180:
vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode

r271250:
vt(4): Change the terminal and buffer sizes, even without a font

This fixes a bug where scroll lock would not work for tty #0 when using
vt_vga's textmode. The reason was that this window is created with a
static 256x100 buffer, larger than the real size of 80x25.

Now, in vt_change_font() and vt_compute_drawable_area(), we still
perform operations even of the window has no font loaded (this is the
case in textmode here vw->vw_font == NULL). One of these operation
resizes the buffer accordingly.

In vt_compute_drawable_area(), we take the terminal size as is (ie.
80x25) for the drawable area.

The font argument to vt_set_border() is removed (it was never used) and
the code now uses the computed drawable area instead of re-doing its own
calculation.

Reported by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
Tested by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>

r271253:
pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
under vt(4).

PR: 193269
Reported by: emaste@
Submitted by: avg@

r271682:
vt(4): Fix a LOR which occurs during a call to vt_upgrade()

Reported by: kib@
Review: https://reviews.freebsd.org/D785
Reviewed by: ray@
Approved by: ray@

r271684:
vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivative

Review: https://reviews.freebsd.org/D789
Reviewed by: nwhitehorn
Approved by: nwhitehorn

Approved by: re (gjb)


# 260817 17-Jan-2014 avg

MFC r258622: dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE


# 260737 16-Jan-2014 avg

MFC r258648: use saner calculations in should_yield


# 284021 05-Jun-2015 kib

MFC r283735:
Remove several write-only variables.


# 273736 27-Oct-2014 hselasky

MFC r263710, r273377, r273378, r273423 and r273455:

- De-vnet hash sizes and hash masks.
- Fix multiple issues related to arguments passed to SYSCTL macros.

Sponsored by: Mellanox Technologies


# 271769 18-Sep-2014 dumbbell

vt(4): Merge several bug fixes and improvements

SVN revisions in this MFC:
269779 270705 270706 271180 271250 271253 271682 271684

Detailed commit list:

r269779:
fbd: Fix a bug where vt_fb_attach() success would be considered a failure

vt_fb_attach() currently always returns 0, but it could return a code
defined in errno.h. However, it doesn't return a CN_* code. So checking
its return value against CN_DEAD (which is 0) is incorrect, and in this
case, a success becomes a failure.

The consequence was unimportant, because the caller (drm_fb_helper.c)
would only log an error message in this case. The console would still
work.

Approved by: nwhitehorn

r270705:
vt(4): Add cngrab() and cnungrab() callbacks

They are used when a panic occurs or when entering a DDB session for
instance.

cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.

r270706:
drm: Don't "taskqueue" vt-switch if under DDB/panic situation

If DDB is active, we can't use a taskqueue thread to switch away from
the X window, because this thread can't run.

Reviewed by: ray@
Approved by: ray@

r271180:
vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode

r271250:
vt(4): Change the terminal and buffer sizes, even without a font

This fixes a bug where scroll lock would not work for tty #0 when using
vt_vga's textmode. The reason was that this window is created with a
static 256x100 buffer, larger than the real size of 80x25.

Now, in vt_change_font() and vt_compute_drawable_area(), we still
perform operations even of the window has no font loaded (this is the
case in textmode here vw->vw_font == NULL). One of these operation
resizes the buffer accordingly.

In vt_compute_drawable_area(), we take the terminal size as is (ie.
80x25) for the drawable area.

The font argument to vt_set_border() is removed (it was never used) and
the code now uses the computed drawable area instead of re-doing its own
calculation.

Reported by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
Tested by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>

r271253:
pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
under vt(4).

PR: 193269
Reported by: emaste@
Submitted by: avg@

r271682:
vt(4): Fix a LOR which occurs during a call to vt_upgrade()

Reported by: kib@
Review: https://reviews.freebsd.org/D785
Reviewed by: ray@
Approved by: ray@

r271684:
vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivative

Review: https://reviews.freebsd.org/D789
Reviewed by: nwhitehorn
Approved by: nwhitehorn

Approved by: re (gjb)


# 260817 17-Jan-2014 avg

MFC r258622: dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE


# 260737 16-Jan-2014 avg

MFC r258648: use saner calculations in should_yield