The total size of the Linux kernel source tree is approaching 40 million lines.Although a large number of obsolete drivers and old platform support codes were deleted in the Linux 7.1 merge window, the overall scale continues to expand, and AMD graphics driver-related code has exceeded 6 million lines.

When the Linux 7.1-rc1 version is expected to be released later today and the Linux 7.1 merge window is about to close, the outside world was originally concerned about whether the large-scale code deletion would cause the total code volume of the kernel to fall back compared to Linux 7.0. However, the results showed that the deletion was still not enough to offset the new content. The total number of lines in the Linux 7.1 Git source tree is still quickly approaching 40 million lines.
In this round of Linux 7.1 development cycle, the kernel has removed ISDN, amateur radio and other old network driver code. This part alone has reduced about 138,000 lines of code. In addition, some outdated PCMCIA drivers and some PCI drivers have also been cleaned up. At the same time, support for the Russian Baikal processor has begun to be removed. Linux 7.1 has also started the decommissioning process of support for the Intel 486 processor. However, the current impact of this part on the total code volume is not obvious. More i486-related cleanup work is expected to continue in subsequent kernel cycles.

According to statistics from the cloc program, the Linux v7.0 Git repository has a total of 39,621,378 lines, including 4,991,874 blank lines, 4,737,829 lines of comments, and 29,891,675 lines of content identified as actual code. As of the morning of April 26, the Linux 7.1 Git source tree has increased to 39,880,636 lines, which means that even after multiple deletions, there is still a net increase of approximately 259,000 lines of code in this round of merger windows. Of this total, there are 5,015,790 blank lines, 4,775,889 lines of comments, and 30,088,957 lines of actual code.
This also means that Linux 7.1 has crossed the threshold of 30 million lines of actual code; if blank lines and comments are counted together, the entire Linux source tree is only one step away from 40 million lines. According to the report, based on the current growth trend, the Linux 7.2 development cycle is likely to be the point when the total kernel code volume officially exceeds 40 million lines.

In addition to the overall size of the kernel, the size of the AMD graphics driver-related directory drivers/gpu/drm/amd in the Linux kernel is also quite large, covering AMDGPU, AMDKFD, display core code, and automatically generated header files for various generations of GPUs. Statistics show that in the Linux 7.0 stage, the total code volume of this modern AMD kernel graphics driver stack was 6,049,235 lines. In the current Linux 7.1 Git state, this number has risen to 6,162,946 lines, further highlighting the continued increase in the proportion of the GPU driver subsystem in the Linux source tree.