Live data from Hacker News

Linux Kernel Fastboot [pdf]

linuxplumbersconf.org

81–90 of 121 posts

Re: Linux Kernel Fastboot [pdf]

#81

I'd really like to get my raspberry pi booting in a couple seconds. I have a few ideas for things I'd like to try but the boot time is too long. Don't need X11 but I would like to use raspbian.

Think like an embedded developer. They’ve done a lot of work in this area.

https://elinux.org/Boot_Time

Re: Linux Kernel Fastboot [pdf]

#82

Earlier quoted context omitted.

Lazy loading is not unique for the web or in anyway a new idea. The web is in fact one of the last places it has appeared in.

Indeed. In apps lazy loading is something you add when you need it. But for kernels, it’s the first problem you tackle: how to pick yourself up with your bootstraps. Booting is tricky now, and it always has been. Right back to the early machines that were booted by manually entering machine code via switches. Interestingly AWS virtual machines still boot in 16-bit mode, then bootstrap up through 32 and then 64 bit mo…

All Intel-compatible and emulated Intel-compatible processors do this. You'd have to run ARM to avoid it.

Re: Linux Kernel Fastboot [pdf]

#83

Earlier quoted context omitted.

I used Powertop on Linux, yes. For Windows, I simply let the laptop run until it had used 50% of the battery. Watts = Joules / second. On Linux, I used the same methodo to calibrate against powertop. (But found less than 5% of discrepancy anyway.)

The only valid approach is to remove the battery and plug it into a kill-a-watt or similar.

Performance and power saving features are vastly different between battery and AC so I don't feel that is relevant at all.

If we are talking about battery-life at least.

Re: Linux Kernel Fastboot [pdf]

#84
post #65
post #7

Earlier quoted context omitted.

I'd love to hear more about the tweaks you've done to Arch. I've gone little beyond a few power management things myself (On a Thinkpad X1C Gen 6). I get decent battery life, but I know it could be better. And giving up Arch would be a tough sell to myself.

I have the same laptop as you. Just install the "tlp" package (The Laptop Project). I'm using Debian but the Arch package should have the same name. You can tweak the settings (/etc/default/tlp on Debian) but out of the box that should get you arround ~4W depending on what is running on your laptop. With light usage that gives more than 10 hours of battery life, even if you don't charge the battery to the max to incr…

Fantastic. Thanks for the info. I've installed tlp, but I never really looked too deeply into it (yet). Most days at the office I'm plugged in - and that can be a problem too with the battery constantly receiving a charge.

Re: Linux Kernel Fastboot [pdf]

#85

I love the bit on slide 16 where initializing 8GB of RAM takes 100MS, so they boot with only 2GB and then hotplug in more memory later.

We've been progressively loading webpages for years. It's like the 7th layer of the stack is working its way down.

Yes, if you call "the 7th layer of the stack" the people who started with it.

Re: Linux Kernel Fastboot [pdf]

#86
post #7

Earlier quoted context omitted.

I'd love to hear more about the tweaks you've done to Arch. I've gone little beyond a few power management things myself (On a Thinkpad X1C Gen 6). I get decent battery life, but I know it could be better. And giving up Arch would be a tough sell to myself.

Very little was needed at all, and what I did do is mostly working around firmware bugs. - Force deep sleep mode, as s2idle doesn't work. - Set the ASPM policy. To anything. Basically the default doesn't work. (I went with 'powersave', obviously.) - Run powertop --auto-tune on boot. - Set the cool-bottom thermal profile, but that's just to make it work as a lap top. - Run a BIOS upgrade. :V (fwupdmgr did the whole jo…

Awesome, thanks. My BIOS upgrades are such a mess. I get notified that I have them.... but they always fail. I haven't dug into the logs to see why. This is honestly the most lazy I've ever been with a Linux install in 20 years, mostly because everything is working "well enough" that I haven't spent time tweaking it. Better battery life/cooler bottom does sound like something I should strive for though.

Re: Linux Kernel Fastboot [pdf]

#87

Earlier quoted context omitted.

Indeed. In apps lazy loading is something you add when you need it. But for kernels, it’s the first problem you tackle: how to pick yourself up with your bootstraps. Booting is tricky now, and it always has been. Right back to the early machines that were booted by manually entering machine code via switches. Interestingly AWS virtual machines still boot in 16-bit mode, then bootstrap up through 32 and then 64 bit mo…

All Intel-compatible and emulated Intel-compatible processors do this. You'd have to run ARM to avoid it.

I thought x86 started in 64-bit mode when using UEFI?

Re: Linux Kernel Fastboot [pdf]

#88
post #7

Earlier quoted context omitted.

I'd love to hear more about the tweaks you've done to Arch. I've gone little beyond a few power management things myself (On a Thinkpad X1C Gen 6). I get decent battery life, but I know it could be better. And giving up Arch would be a tough sell to myself.

I run Fedora on a Thinkpad X1C Gen 3. tlp[1] has been, by far, the best tool in optimising my power usage. powertop for some monitoring, as these days it recommends some less than ideal tunables, especially with regards to SATA power management ("med_power_with_dipm" vs "min_power" [2][3]). Some modules also have blacklists that prevent certain power saving modes from being enabled. This is true for the snd-hda-intel…

Thanks! Yeah, Just running Slack and Chrome (not to mention Spotify sometimes) can send my resource usage fairly high. I went back to Vim (from a couple of Electron-based editors running in vim-emulation mode). I used i3 a bit for about a year and never quite got it to my liking. Things like bluetooth and audio management seemed kinda hacked together - because they were. i3 isn't an environment, it's just a window manager. That's totally great, but KDE seems so seamless in this area. Worth looking into again though.

Re: Linux Kernel Fastboot [pdf]

#89
post #10
post #7

Earlier quoted context omitted.

I'd love to hear more about the tweaks you've done to Arch. I've gone little beyond a few power management things myself (On a Thinkpad X1C Gen 6). I get decent battery life, but I know it could be better. And giving up Arch would be a tough sell to myself.

The thing with arch is it’s mostly not more tweaks that give you better battery, it’s not having all the crap that Ubuntu preloads running that makes that happen.

Folks think I'm crazy for using Arch as my main dev machine. I'm not an Ubuntu hater at all (it runs my main server in the basement at home)... but it'd be awfully hard to go back to using it as my main machine.

Re: Linux Kernel Fastboot [pdf]

#90
post #55

I love the bit on slide 16 where initializing 8GB of RAM takes 100MS, so they boot with only 2GB and then hotplug in more memory later.

There are some drawbacks to that. Memory flagged as hotplug can't be used by the kernel itself (because otherwise unplugging the RAM would risk crashing the system). That includes things like network buffers and a number of things which use the total RAM size as a guideline. There was a bug in a proposed kernel patch a while back, that we were testing. It ended up designating a good chunk of the machine's RAM as hotp…

I think you may be confusing some of the aspects of hot-add with hot-remove. Memory which you want to later remove should be onlined as "movable" and it has some content limitations. But, not all hot-added memory must be onlined that way. You can very easily just online it as "normal", which is (believe it or not) normal and can have any allocation type placed there.
Post reply on HN