I'm not sure why you feel compelled to even bother playing with this. In
20-21 years of using Linux I've never had to set this manually. But . . .

https://www.google.com/search?q=%2Fproc%2Fsys%2Fvm%2Fmin_free_kbytes&ie=utf-8
---->
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-memory-tunables.html
---->

Be cautious when setting this parameter, as both too-low and too-high
> values can be damaging and break your system.
> Setting *min_free_kbytes* too low prevents the system from reclaiming
> memory. This can result in system hangs and OOM-killing multiple processes.
> However, setting this parameter to a value that is too high (5-10% of
> total system memory) will cause your system to become out-of-memory
> immediately. Linux is designed to use all available RAM to cache file
> system data. Setting a high *min_free_kbytes* value results in the system
> spending too much time reclaiming memory.
>



On Tue, Jul 19, 2016 at 9:11 AM, Ankur Tank <artf...@gmail.com> wrote:

>
> We are using BeagleBoneBlack based custom Linux board.
> It has 256MB of RAM and 4GB of eMMC.
> Currently RFS size of the project is 163MB. While RFS partition size is
> 500MB.
> For testing, we added 20 number of big files(10MB size) and started
> firmware upgrade process.
>
> During the firmware Upgrade process we see following error when roofs is
> being written,
>
> We could solve it by changing
> /proc/sys/vm/min_free_kbytes
>
> from *2005* to *4096*.
>
> *But now my doubt is what should be the ideal value for that, what factors
> we should consider while calculating it. From the kernel documentation I
> don't get that information, *
> *but I could understand one thing that is this value can not be too low or
> too high or else system will break.*
>
> Any suggestion/pointer ?
>
>     [ 6676.674219] mmcqd/1: page allocation failure: order:1, mode:
> 0x200020
>     [ 6676.674256] CPU: 0 PID: 612 Comm: mmcqd/1 Tainted: P           O
> 3.12.10-005-ts-armv7l #2
>     [ 6676.674321] [<c0012d24>] (unwind_backtrace+0x0/0xf4) from [<
> c0011130>] (show_stack+0x10/0x14)
>     [ 6676.674355] [<c0011130>] (show_stack+0x10/0x14) from [<c0087548>] (
> warn_alloc_failed+0xe0/0x118)
>     [ 6676.674383] [<c0087548>] (warn_alloc_failed+0xe0/0x118) from [<
> c008a3ac>] (__alloc_pages_nodemask+0x74c/0x8f8)
>     [ 6676.674413] [<c008a3ac>] (__alloc_pages_nodemask+0x74c/0x8f8) from
> [<c00b2e8c>] (cache_alloc_refill+0x328/0x620)
>     [ 6676.674436] [<c00b2e8c>] (cache_alloc_refill+0x328/0x620) from [<
> c00b3224>] (__kmalloc+0xa0/0xe8)
>     [ 6676.674471] [<c00b3224>] (__kmalloc+0xa0/0xe8) from [<c0212904>] (
> edma_prep_slave_sg+0x84/0x388)
>     [ 6676.674505] [<c0212904>] (edma_prep_slave_sg+0x84/0x388) from [<
> c02ec0a0>] (omap_hsmmc_request+0x414/0x508)
>     [ 6676.674544] [<c02ec0a0>] (omap_hsmmc_request+0x414/0x508) from [<
> c02d6748>] (mmc_start_request+0xc4/0xe0)
>     [ 6676.674568] [<c02d6748>] (mmc_start_request+0xc4/0xe0) from [<
> c02d7530>] (mmc_start_req+0x2d8/0x38c)
>     [ 6676.674589] [<c02d7530>] (mmc_start_req+0x2d8/0x38c) from [<
> c02e4818>] (mmc_blk_issue_rw_rq+0xb4/0x9d8)
>     [ 6676.674611] [<c02e4818>] (mmc_blk_issue_rw_rq+0xb4/0x9d8) from [<
> c02e52e0>] (mmc_blk_issue_rq+0x1a4/0x468)
>     [ 6676.674631] [<c02e52e0>] (mmc_blk_issue_rq+0x1a4/0x468) from [<
> c02e5c68>] (mmc_queue_thread+0x88/0x118)
>     [ 6676.674657] [<c02e5c68>] (mmc_queue_thread+0x88/0x118) from [<
> c004d8b8>] (kthread+0xb4/0xb8)
>     [ 6676.674681] [<c004d8b8>] (kthread+0xb4/0xb8) from [<c000e298>] (
> ret_from_fork+0x14/0x3c)
>     [ 6676.674691] Mem-info:
>     [ 6676.674700] Normal per-cpu:
>     [ 6676.674711] CPU    0: hi:   90, btch:  15 usd:  79
>     [ 6676.674739] active_anon:4889 inactive_anon:13 isolated_anon:0
>     [ 6676.674739]  active_file:8082 inactive_file:43196 isolated_file:0
>     [ 6676.674739]  unevictable:422 dirty:2 writeback:1152 unstable:0
>     [ 6676.674739]  free:3286 slab_reclaimable:1090 slab_unreclaimable:915
>     [ 6676.674739]  mapped:1593 shmem:39 pagetables:181 bounce:0
>     [ 6676.674739]  free_cma:1982
>     [ 6676.674800] Normal free:13144kB min:2004kB low:2504kB high:3004kB
> active_anon:19556kB inactive_anon:52kB active_file:32328kB inactive_file:
> 172784kB unevictable:o
>     [ 6676.674813] lowmem_reserve[]: 0 0 0
>     [ 6676.674831] Normal: 2584*4kB (UMC) 217*8kB (C) 57*16kB (C) 5*32kB (
> C) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB =
> 13144kB
>     [ 6676.674885] 51661 total pagecache pages
>     [ 6676.674900] 0 pages in swap cache
>     [ 6676.674910] Swap cache stats: add 0, delete 0, find 0/0
>     [ 6676.674918] Free swap  = 0kB
>     [ 6676.674925] Total swap = 0kB
>     [ 6676.674938] SLAB: Unable to allocate memory on node 0 (gfp=0x20)
>     [ 6676.674949]   cache: kmalloc-8192, object size: 8192, order: 1
>     [ 6676.674962]   node 0: slabs: 3/3, objs: 3/3, free: 0
>     [ 6676.674984] omap_hsmmc 481d8000.mmc: prep_slave_sg() failed
>     [ 6676.674997] omap_hsmmc 481d8000.mmc: MMC start dma failure
>     [ 6676.676181] mmcblk0: unknown error -1 sending read/write command,
> card status 0x900
>     [ 6676.676300] end_request: I/O error, dev mmcblk0, sector 27648
>     [ 6676.676318] Buffer I/O error on device mmcblk0p9, logical block 896
>     [ 6676.676329] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676401] end_request: I/O error, dev mmcblk0, sector 27656
>     [ 6676.676415] Buffer I/O error on device mmcblk0p9, logical block 897
>     [ 6676.676425] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676450] end_request: I/O error, dev mmcblk0, sector 27664
>     [ 6676.676461] Buffer I/O error on device mmcblk0p9, logical block 898
>     [ 6676.676471] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676494] end_request: I/O error, dev mmcblk0, sector 27672
>     [ 6676.676505] Buffer I/O error on device mmcblk0p9, logical block 899
>     [ 6676.676515] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676537] end_request: I/O error, dev mmcblk0, sector 27680
>     [ 6676.676548] Buffer I/O error on device mmcblk0p9, logical block 900
>     [ 6676.676558] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676580] end_request: I/O error, dev mmcblk0, sector 27688
>     [ 6676.676591] Buffer I/O error on device mmcblk0p9, logical block 901
>     [ 6676.676601] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676622] end_request: I/O error, dev mmcblk0, sector 27696
>     [ 6676.676634] Buffer I/O error on device mmcblk0p9, logical block 902
>     [ 6676.676643] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676665] end_request: I/O error, dev mmcblk0, sector 27704
>     [ 6676.676676] Buffer I/O error on device mmcblk0p9, logical block 903
>     [ 6676.676685] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676707] end_request: I/O error, dev mmcblk0, sector 27712
>     [ 6676.676718] Buffer I/O error on device mmcblk0p9, logical block 904
>     [ 6676.676728] lost page write due to I/O error on mmcblk0p9
>     [ 6676.676749] end_request: I/O error, dev mmcblk0, sector 27720
>     [ 6676.678266] mmcqd/1: page allocation failure: order:1, mode:
> 0x200020
>     [ 6676.678285] CPU: 0 PID: 612 Comm: mmcqd/1 Tainted: P           O
> 3.12.10-005-ts-armv7l #2
>     [ 6676.678330] [<c0012d24>] (unwind_backtrace+0x0/0xf4) from [<
> c0011130>] (show_stack+0x10/0x14)
>     [ 6676.678358] [<c0011130>] (show_stack+0x10/0x14) from [<c0087548>] (
> warn_alloc_failed+0xe0/0x118)
>     [ 6676.678385] [<c0087548>] (warn_alloc_failed+0xe0/0x118) from [<
> c008a3ac>] (__alloc_pages_nodemask+0x74c/0x8f8)
>     [ 6676.678412] [<c008a3ac>] (__alloc_pages_nodemask+0x74c/0x8f8) from
> [<c00b2e8c>] (cache_alloc_refill+0x328/0x620)
>     [ 6676.678434] [<c00b2e8c>] (cache_alloc_refill+0x328/0x620) from [<
> c00b3224>] (__kmalloc+0xa0/0xe8)
>     [ 6676.678464] [<c00b3224>] (__kmalloc+0xa0/0xe8) from [<c0212904>] (
> edma_prep_slave_sg+0x84/0x388)
>     [ 6676.678493] [<c0212904>] (edma_prep_slave_sg+0x84/0x388) from [<
> c02ec0a0>] (omap_hsmmc_request+0x414/0x508)
>     [ 6676.678524] [<c02ec0a0>] (omap_hsmmc_request+0x414/0x508) from [<
> c02d6748>] (mmc_start_request+0xc4/0xe0)
>     [ 6676.678547] [<c02d6748>] (mmc_start_request+0xc4/0xe0) from [<
> c02d7530>] (mmc_start_req+0x2d8/0x38c)
>     [ 6676.678568] [<c02d7530>] (mmc_start_req+0x2d8/0x38c) from [<
> c02e4994>] (mmc_blk_issue_rw_rq+0x230/0x9d8)
>     [ 6676.678589] [<c02e4994>] (mmc_blk_issue_rw_rq+0x230/0x9d8) from [<
> c02e52e0>] (mmc_blk_issue_rq+0x1a4/0x468)
>     [ 6676.678608] [<c02e52e0>] (mmc_blk_issue_rq+0x1a4/0x468) from [<
> c02e5c68>] (mmc_queue_thread+0x88/0x118)
>     [ 6676.678632] [<c02e5c68>] (mmc_queue_thread+0x88/0x118) from [<
> c004d8b8>] (kthread+0xb4/0xb8)
>     [ 6676.678655] [<c004d8b8>] (kthread+0xb4/0xb8) from [<c000e298>] (
> ret_from_fork+0x14/0x3c)
>     [ 6676.678664] Mem-info:
>     [ 6676.678672] Normal per-cpu:
>     [ 6676.678683] CPU    0: hi:   90, btch:  15 usd:  84
>     [ 6676.678709] active_anon:4889 inactive_anon:13 isolated_anon:0
>     [ 6676.678709]  active_file:8082 inactive_file:43196 isolated_file:0
>     [ 6676.678709]  unevictable:422 dirty:2 writeback:896 unstable:0
>     [ 6676.678709]  free:3286 slab_reclaimable:1090 slab_unreclaimable:910
>     [ 6676.678709]  mapped:1593 shmem:39 pagetables:181 bounce:0
>     [ 6676.678709]  free_cma:1982
>     [ 6676.678764] Normal free:13144kB min:2004kB low:2504kB high:3004kB
> active_anon:19556kB inactive_anon:52kB active_file:32328kB inactive_file:
> 172784kB unevictable:o
>     [ 6676.678776] lowmem_reserve[]: 0 0 0
>     [ 6676.678791] Normal: 2584*4kB (UMC) 217*8kB (C) 57*16kB (C) 5*32kB (
> C) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB =
> 13144kB
>     [ 6676.678842] 51661 total pagecache pages
>     [ 6676.678854] 0 pages in swap cache
>     [ 6676.678864] Swap cache stats: add 0, delete 0, find 0/0
>     [ 6676.678871] Free swap  = 0kB
>     [ 6676.678878] Total swap = 0kB
>     [ 6676.678898] omap_hsmmc 481d8000.mmc: prep_slave_sg() failed
>     [ 6676.678911] omap_hsmmc 481d8000.mmc: MMC start dma failure
>     [ 6676.679631] mmcblk0: unknown error -1 sending read/write command,
> card status 0x900
>     [ 6676.681433] mmcqd/1: page allocation failure: order:1, mode:
> 0x200020
>     [ 6676.681455] CPU: 0 PID: 612 Comm: mmcqd/1 Tainted: P           O
> 3.12.10-005-ts-armv7l #2
>     [ 6676.681494] [<c0012d24>] (unwind_backtrace+0x0/0xf4) from [<
> c0011130>] (show_stack+0x10/0x14)
>     [ 6676.681523] [<c0011130>] (show_stack+0x10/0x14) from [<c0087548>] (
> warn_alloc_failed+0xe0/0x118)
>     [ 6676.681546] [<c0087548>] (warn_alloc_failed+0xe0/0x118) from [<
> c008a3ac>] (__alloc_pages_nodemask+0x74c/0x8f8)
>     [ 6676.681570] [<c008a3ac>] (__alloc_pages_nodemask+0x74c/0x8f8) from
> [<c00b2e8c>] (cache_alloc_refill+0x328/0x620)
>     [ 6676.681592] [<c00b2e8c>] (cache_alloc_refill+0x328/0x620) from [<
> c00b3224>] (__kmalloc+0xa0/0xe8)
>     [ 6676.681618] [<c00b3224>] (__kmalloc+0xa0/0xe8) from [<c0212904>] (
> edma_prep_slave_sg+0x84/0x388)
>     [ 6676.681644] [<c0212904>] (edma_prep_slave_sg+0x84/0x388) from [<
> c02ec0a0>] (omap_hsmmc_request+0x414/0x508)
>     [ 6676.681673] [<c02ec0a0>] (omap_hsmmc_request+0x414/0x508) from [<
> c02d6748>] (mmc_start_request+0xc4/0xe0)
>     [ 6676.681695] [<c02d6748>] (mmc_start_request+0xc4/0xe0) from [<
> c02d7530>] (mmc_start_req+0x2d8/0x38c)
>     [ 6676.681715] [<c02d7530>] (mmc_start_req+0x2d8/0x38c) from [<
> c02e4994>] (mmc_blk_issue_rw_rq+0x230/0x9d8)
>     [ 6676.681735] [<c02e4994>] (mmc_blk_issue_rw_rq+0x230/0x9d8) from [<
> c02e52e0>] (mmc_blk_issue_rq+0x1a4/0x468)
>     [ 6676.681755] [<c02e52e0>] (mmc_blk_issue_rq+0x1a4/0x468) from [<
> c02e5c68>] (mmc_queue_thread+0x88/0x118)
>     [ 6676.681778] [<c02e5c68>] (mmc_queue_thread+0x88/0x118) from [<
> c004d8b8>] (kthread+0xb4/0xb8)
>     [ 6676.681800] [<c004d8b8>] (kthread+0xb4/0xb8) from [<c000e298>] (
> ret_from_fork+0x14/0x3c)
>     [ 6676.681809] Mem-info:
>     [ 6676.681816] Normal per-cpu:
>     [ 6676.681826] CPU    0: hi:   90, btch:  15 usd:  88
>     [ 6676.681852] active_anon:4889 inactive_anon:13 isolated_anon:0
>     [ 6676.681852]  active_file:8082 inactive_file:43196 isolated_file:0
>     [ 6676.681852]  unevictable:422 dirty:2 writeback:768 unstable:0
>     [ 6676.681852]  free:3286 slab_reclaimable:1090 slab_unreclaimable:906
>     [ 6676.681852]  mapped:1593 shmem:39 pagetables:181 bounce:0
>     [ 6676.681852]  free_cma:1982
>     [ 6676.681908] Normal free:13144kB min:2004kB low:2504kB high:3004kB
> active_anon:19556kB inactive_anon:52kB active_file:32328kB inactive_file:
> 172784kB unevictable:o
>     2016-07-19T06:47:28.562553-04:00 kernel: [ 6676.681920] lowmem_reserve
> []: 0 0 0
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/5955e7cb-9c9b-43b3-a095-0af08d67a062%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/5955e7cb-9c9b-43b3-a095-0af08d67a062%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORpUkKjCNK7RuHAdnL3wP9Oih_FipsW4dgmMCOF1POYXxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to