1

I want to have a large log buffer for my logging needs on an Android device (Nexus 5). I've already increased the log buffer size to 4MiB by changing CONFIG_LOG_BUF_SHIFT to 22 and compiling the kernel and everything was working fine. But if I set this value to 23 or more I get these error messages in kernel log:

<3>[  831.843405] audit: *NO* daemon at audit_pid=3115
<4>[  831.843468] audit: audit_lost=1 audit_rate_limit=4000 audit_backlog_limit=8192
<3>[  831.843584] audit: auditd disappeared

and seems like auditd is constantly restarting:

<38>[   18.793725] logd.auditd: start
<38>[   23.835792] logd.auditd: start
<38>[   28.854019] logd.auditd: start
M.D
  • 11
  • 2
  • what is the range for LOG_BUF_SHIFT & LOG_CPU_MAX_BUF_SHIFT in your system? – 0x07FC Sep 22 '16 at 18:59
  • @0x07FC The range for LOG_BUF_SHIFT was originally between 12 and 21 but I changed the upper limit to 24. Also there is no LOG_CPU_MAX_BUF_SHIFT since it is a 3.17+ config. – M.D Sep 23 '16 at 00:39
  • There are lot of CONFIG_LOG_BUF_SHIFTs in diff files.Which one had you chanded ? – linjiejun Jun 02 '21 at 01:58

1 Answers1

0

The SLUB kernl allocator has a size limit that is (1UL << (PAGE_SHIFT + MAX_ORDER - 1)) = (1UL << 22) that is 4MB. In order to allocate more space you should increase one of the 2 defines. The first can be raised from 12 to 16 by enabling 64K pages in the kernel config, the second can be raised from 11 to 14 by using 64K pages and the configuration TRANSPARENT_HUGEPAGE.

tux_mind
  • 306
  • 1
  • 5
  • 15