Linux 4.0 no longer needs to reboot _linux

Source: Internet
Author: User

In Linux 4.0, you may no longer need to reboot your operating system.

One of the reasons you like to use Linux in most servers or data centers is that you don't need to do frequent restart operations. Admittedly, some critical patches have to be restarted, but you can wait a few months before doing this. Now, thanks to the latest updates from the Linux kernel, you may not be able to reboot for years.

Thanks to the Ksplice project, this feature can be achieved in 2009. This project uses a custom kernel module to add new code to the running kernel after comparing the original and patched cores. In the kernel that supports Ksplice, each feature that will be patched carries a special set of flags to differentiate. The ksplice process will monitor that the code that is patching the function is not currently in use, and when it is patched, continue running on your server.

Oracle acquired the Ksplice project in 2011 as an optional service for RHEL to apply it to its own Oracle Linux (a cloned version of a RHEL (Red Hat Enterprise Linux)). This isolates this technology from other enterprise and server versions of Linux.

Later, Kemelcare released a non-boot patch for most enterprise release Linux. This procedure, as a proprietary software, can only be enjoyed by monthly payments. This makes it difficult to meet most Linux system administrators.

So Red Hat and SUSE are starting to start a completely open-source, non restart solution for Linux to install severe patches. Red Had's project is named Kpatch, and SuSE's project is named Kgraft.

The two companies have adopted different approaches. Kpatch issued a stop_machine () command. After that, it looks at the existing stack processing to use Ftrace, if the patch can be made very safe, it will redirect the running code to the patch function, and then delete the now obsolete code.

Better than ever, data centers are running around the world, but many of them need a 21st century-style reboot. Today's data centers must be more efficient, more robust and more flexible than ever before. We check how you can run your data center, and instead outsource to a cloud or a service provider, or take a mixed approach.

Kgraft has been using ftrace, although it is at the thread level. When an old function is called, it navigates to a point in the thread and then switches it to a new function.

While the end result is the same, the operating system remains operational while patching, but there are significant performance differences. When Kgraft may take several minutes, Kpatch can take only 1 to 40 milliseconds, but they never stop.
At the October 2014 Linux Developer conference, two teams were integrated and started to work together on the best programs to make Linux patches without restarting. In fact, they eventually threw both Kpatch and Kgraft into the Linux kernel.

Jiri Kosina, a SuSE software engineer and Linux kernel developer, explained that the hot patches of the Linux kernel would "provide a basic infrastructure for functions" (e.g., code redirection), including APIs for kernel modules containing actual patches (application interfaces), and in order to operate patches in user space Api/abi (Application Binary interface), this is "relatively simple and concise, because it uses as much as possible the existing kernel base (named Ftrace)." It is also self-contained and, in a sense, does not invoke itself in any other kernel subsystem (it does not even touch any other code).

The Linux 4.0 RC version has now been released, Kosina claims: "The x86 architecture is now being implemented as a reference framework, and support for PowerPC, s390 and arm is already in progress". Indeed, the support source code for these architectures is already on the Live patching Git code.
Simple code is just the beginning, and your distribution will be patched to support and use it. With the support of Red Hat and SUSE, live patches will soon default to all commercial Linux distributions.

The above mentioned is the entire content of this article, I hope you can enjoy.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.