buf_LRU_old_adjust_len(buf_pool):

//old_len==512,new_len=min(512*378/1024, 512-25),其实是512的3/8
// buf_pool->LRU_old_ratio 为378(innodb_old_blocks_pct默认值是37)
old_len = buf_pool->LRU_old_len;
new_len = ut_min(UT_LIST_GET_LEN(buf_pool->LRU)
* buf_pool->LRU_old_ratio / BUF_LRU_OLD_RATIO_DIV,
UT_LIST_GET_LEN(buf_pool->LRU)- (20+ 5));
for (;;) {
buf_page_t* LRU_old = buf_pool->LRU_old;
if (old_len +20 < new_len) {
buf_pool->LRU_old = LRU_old = UT_LIST_GET_PREV(LRU, LRU_old);
old_len = ++buf_pool->LRU_old_len;
buf_page_set_old(LRU_old, TRUE);
}else if (old_len > new_len +20) {
//512的前209个大概都是young
buf_pool->LRU_old = UT_LIST_GET_NEXT(LRU, LRU_old);
old_len = --buf_pool->LRU_old_len;
buf_page_set_old(LRU_old, FALSE);
}else{
Return;
}
}