Project

General

Profile

Actions

Bug #6395

closed

cannot tune segkpsize up

Added by Arne Jansen almost 6 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2015-10-24
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

It's not possible to tune segkpsize up, the system panics with 'startup: cannot attach segkp' due to overlapping segments. The reason is that layout_kernel_va() builds a segment layout based on the value of segkpsize before /etc/system is read. So if the value gets increased through /etc/system afterwards, the system tries to create a segment that doesn't fit anymore into the calculated layout.
Also, the sanity checks for segkpsize are done before the value is read.

It has been broken by

commit 35b1ab9964f57b69ba8f03d2962f94036aa78c57
Author: josephb <none@none>
Date:   Wed Aug 8 11:14:39 2007 -0700

    6582841 boot_/final_kerneheap and kernelheap_extend() nonsense needs to be ripped out
    6507265 amd64 Solaris will fail on more than 1 Terabyte of memory

which moved the layout part from after kmem_init() to before it. kmem_init() reads /etc/system through mod_read_system_file().

Actions #1

Updated by Alasdair Lumsden about 1 year ago

Arne Jansen wrote:

It's not possible to tune segkpsize up, the system panics with 'startup: cannot attach segkp'...

Hit the same issue when attempting to up the number of threads, as 88k LWPS on a modern 1TB RAM system is too low.

To work around this we've compiled a custom SmartOS image but doing this for every release is going to be tedious.

Should the default value just be upped as a quick fix?

Actions #2

Updated by Carlos Neira about 1 year ago

  • Assignee set to Carlos Neira
Actions #3

Updated by Carlos Neira about 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20
Actions #4

Updated by Carlos Neira about 1 year ago

  • % Done changed from 20 to 60
Actions #5

Updated by Carlos Neira about 1 year ago

  • % Done changed from 60 to 90
Actions #6

Updated by Electric Monk about 1 year ago

  • Gerrit CR set to 951
Actions #7

Updated by Electric Monk 5 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 860b5cc8ca1cde8ee07c510e06bf21ad9103bb69

commit  860b5cc8ca1cde8ee07c510e06bf21ad9103bb69
Author: cneira <cneirabustos@gmail.com>
Date:   2021-05-13T04:10:03.000Z

    6395 cannot tune segkpsize up
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF