memcontrol.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. /* memcontrol.c - Memory Controller
  2. *
  3. * Copyright IBM Corporation, 2007
  4. * Author Balbir Singh <balbir@linux.vnet.ibm.com>
  5. *
  6. * Copyright 2007 OpenVZ SWsoft Inc
  7. * Author: Pavel Emelianov <xemul@openvz.org>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. */
  19. #include <linux/res_counter.h>
  20. #include <linux/memcontrol.h>
  21. #include <linux/cgroup.h>
  22. #include <linux/mm.h>
  23. #include <linux/page-flags.h>
  24. #include <linux/backing-dev.h>
  25. #include <linux/bit_spinlock.h>
  26. #include <linux/rcupdate.h>
  27. #include <linux/swap.h>
  28. #include <linux/spinlock.h>
  29. #include <linux/fs.h>
  30. #include <asm/uaccess.h>
  31. struct cgroup_subsys mem_cgroup_subsys;
  32. static const int MEM_CGROUP_RECLAIM_RETRIES = 5;
  33. /*
  34. * The memory controller data structure. The memory controller controls both
  35. * page cache and RSS per cgroup. We would eventually like to provide
  36. * statistics based on the statistics developed by Rik Van Riel for clock-pro,
  37. * to help the administrator determine what knobs to tune.
  38. *
  39. * TODO: Add a water mark for the memory controller. Reclaim will begin when
  40. * we hit the water mark. May be even add a low water mark, such that
  41. * no reclaim occurs from a cgroup at it's low water mark, this is
  42. * a feature that will be implemented much later in the future.
  43. */
  44. struct mem_cgroup {
  45. struct cgroup_subsys_state css;
  46. /*
  47. * the counter to account for memory usage
  48. */
  49. struct res_counter res;
  50. /*
  51. * Per cgroup active and inactive list, similar to the
  52. * per zone LRU lists.
  53. * TODO: Consider making these lists per zone
  54. */
  55. struct list_head active_list;
  56. struct list_head inactive_list;
  57. /*
  58. * spin_lock to protect the per cgroup LRU
  59. */
  60. spinlock_t lru_lock;
  61. unsigned long control_type; /* control RSS or RSS+Pagecache */
  62. };
  63. /*
  64. * We use the lower bit of the page->page_cgroup pointer as a bit spin
  65. * lock. We need to ensure that page->page_cgroup is atleast two
  66. * byte aligned (based on comments from Nick Piggin)
  67. */
  68. #define PAGE_CGROUP_LOCK_BIT 0x0
  69. #define PAGE_CGROUP_LOCK (1 << PAGE_CGROUP_LOCK_BIT)
  70. /*
  71. * A page_cgroup page is associated with every page descriptor. The
  72. * page_cgroup helps us identify information about the cgroup
  73. */
  74. struct page_cgroup {
  75. struct list_head lru; /* per cgroup LRU list */
  76. struct page *page;
  77. struct mem_cgroup *mem_cgroup;
  78. atomic_t ref_cnt; /* Helpful when pages move b/w */
  79. /* mapped and cached states */
  80. };
  81. enum {
  82. MEM_CGROUP_TYPE_UNSPEC = 0,
  83. MEM_CGROUP_TYPE_MAPPED,
  84. MEM_CGROUP_TYPE_CACHED,
  85. MEM_CGROUP_TYPE_ALL,
  86. MEM_CGROUP_TYPE_MAX,
  87. };
  88. static struct mem_cgroup init_mem_cgroup;
  89. static inline
  90. struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont)
  91. {
  92. return container_of(cgroup_subsys_state(cont,
  93. mem_cgroup_subsys_id), struct mem_cgroup,
  94. css);
  95. }
  96. static inline
  97. struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p)
  98. {
  99. return container_of(task_subsys_state(p, mem_cgroup_subsys_id),
  100. struct mem_cgroup, css);
  101. }
  102. void mm_init_cgroup(struct mm_struct *mm, struct task_struct *p)
  103. {
  104. struct mem_cgroup *mem;
  105. mem = mem_cgroup_from_task(p);
  106. css_get(&mem->css);
  107. mm->mem_cgroup = mem;
  108. }
  109. void mm_free_cgroup(struct mm_struct *mm)
  110. {
  111. css_put(&mm->mem_cgroup->css);
  112. }
  113. static inline int page_cgroup_locked(struct page *page)
  114. {
  115. return bit_spin_is_locked(PAGE_CGROUP_LOCK_BIT,
  116. &page->page_cgroup);
  117. }
  118. void page_assign_page_cgroup(struct page *page, struct page_cgroup *pc)
  119. {
  120. int locked;
  121. /*
  122. * While resetting the page_cgroup we might not hold the
  123. * page_cgroup lock. free_hot_cold_page() is an example
  124. * of such a scenario
  125. */
  126. if (pc)
  127. VM_BUG_ON(!page_cgroup_locked(page));
  128. locked = (page->page_cgroup & PAGE_CGROUP_LOCK);
  129. page->page_cgroup = ((unsigned long)pc | locked);
  130. }
  131. struct page_cgroup *page_get_page_cgroup(struct page *page)
  132. {
  133. return (struct page_cgroup *)
  134. (page->page_cgroup & ~PAGE_CGROUP_LOCK);
  135. }
  136. static void __always_inline lock_page_cgroup(struct page *page)
  137. {
  138. bit_spin_lock(PAGE_CGROUP_LOCK_BIT, &page->page_cgroup);
  139. VM_BUG_ON(!page_cgroup_locked(page));
  140. }
  141. static void __always_inline unlock_page_cgroup(struct page *page)
  142. {
  143. bit_spin_unlock(PAGE_CGROUP_LOCK_BIT, &page->page_cgroup);
  144. }
  145. /*
  146. * Tie new page_cgroup to struct page under lock_page_cgroup()
  147. * This can fail if the page has been tied to a page_cgroup.
  148. * If success, returns 0.
  149. */
  150. static inline int
  151. page_cgroup_assign_new_page_cgroup(struct page *page, struct page_cgroup *pc)
  152. {
  153. int ret = 0;
  154. lock_page_cgroup(page);
  155. if (!page_get_page_cgroup(page))
  156. page_assign_page_cgroup(page, pc);
  157. else /* A page is tied to other pc. */
  158. ret = 1;
  159. unlock_page_cgroup(page);
  160. return ret;
  161. }
  162. /*
  163. * Clear page->page_cgroup member under lock_page_cgroup().
  164. * If given "pc" value is different from one page->page_cgroup,
  165. * page->cgroup is not cleared.
  166. * Returns a value of page->page_cgroup at lock taken.
  167. * A can can detect failure of clearing by following
  168. * clear_page_cgroup(page, pc) == pc
  169. */
  170. static inline struct page_cgroup *
  171. clear_page_cgroup(struct page *page, struct page_cgroup *pc)
  172. {
  173. struct page_cgroup *ret;
  174. /* lock and clear */
  175. lock_page_cgroup(page);
  176. ret = page_get_page_cgroup(page);
  177. if (likely(ret == pc))
  178. page_assign_page_cgroup(page, NULL);
  179. unlock_page_cgroup(page);
  180. return ret;
  181. }
  182. static void __mem_cgroup_move_lists(struct page_cgroup *pc, bool active)
  183. {
  184. if (active)
  185. list_move(&pc->lru, &pc->mem_cgroup->active_list);
  186. else
  187. list_move(&pc->lru, &pc->mem_cgroup->inactive_list);
  188. }
  189. int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem)
  190. {
  191. int ret;
  192. task_lock(task);
  193. ret = task->mm && mm_cgroup(task->mm) == mem;
  194. task_unlock(task);
  195. return ret;
  196. }
  197. /*
  198. * This routine assumes that the appropriate zone's lru lock is already held
  199. */
  200. void mem_cgroup_move_lists(struct page_cgroup *pc, bool active)
  201. {
  202. struct mem_cgroup *mem;
  203. if (!pc)
  204. return;
  205. mem = pc->mem_cgroup;
  206. spin_lock(&mem->lru_lock);
  207. __mem_cgroup_move_lists(pc, active);
  208. spin_unlock(&mem->lru_lock);
  209. }
  210. unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
  211. struct list_head *dst,
  212. unsigned long *scanned, int order,
  213. int mode, struct zone *z,
  214. struct mem_cgroup *mem_cont,
  215. int active)
  216. {
  217. unsigned long nr_taken = 0;
  218. struct page *page;
  219. unsigned long scan;
  220. LIST_HEAD(pc_list);
  221. struct list_head *src;
  222. struct page_cgroup *pc;
  223. if (active)
  224. src = &mem_cont->active_list;
  225. else
  226. src = &mem_cont->inactive_list;
  227. spin_lock(&mem_cont->lru_lock);
  228. for (scan = 0; scan < nr_to_scan && !list_empty(src); scan++) {
  229. pc = list_entry(src->prev, struct page_cgroup, lru);
  230. page = pc->page;
  231. VM_BUG_ON(!pc);
  232. if (PageActive(page) && !active) {
  233. __mem_cgroup_move_lists(pc, true);
  234. scan--;
  235. continue;
  236. }
  237. if (!PageActive(page) && active) {
  238. __mem_cgroup_move_lists(pc, false);
  239. scan--;
  240. continue;
  241. }
  242. /*
  243. * Reclaim, per zone
  244. * TODO: make the active/inactive lists per zone
  245. */
  246. if (page_zone(page) != z)
  247. continue;
  248. /*
  249. * Check if the meta page went away from under us
  250. */
  251. if (!list_empty(&pc->lru))
  252. list_move(&pc->lru, &pc_list);
  253. else
  254. continue;
  255. if (__isolate_lru_page(page, mode) == 0) {
  256. list_move(&page->lru, dst);
  257. nr_taken++;
  258. }
  259. }
  260. list_splice(&pc_list, src);
  261. spin_unlock(&mem_cont->lru_lock);
  262. *scanned = scan;
  263. return nr_taken;
  264. }
  265. /*
  266. * Charge the memory controller for page usage.
  267. * Return
  268. * 0 if the charge was successful
  269. * < 0 if the cgroup is over its limit
  270. */
  271. int mem_cgroup_charge(struct page *page, struct mm_struct *mm,
  272. gfp_t gfp_mask)
  273. {
  274. struct mem_cgroup *mem;
  275. struct page_cgroup *pc;
  276. unsigned long flags;
  277. unsigned long nr_retries = MEM_CGROUP_RECLAIM_RETRIES;
  278. /*
  279. * Should page_cgroup's go to their own slab?
  280. * One could optimize the performance of the charging routine
  281. * by saving a bit in the page_flags and using it as a lock
  282. * to see if the cgroup page already has a page_cgroup associated
  283. * with it
  284. */
  285. retry:
  286. lock_page_cgroup(page);
  287. pc = page_get_page_cgroup(page);
  288. /*
  289. * The page_cgroup exists and the page has already been accounted
  290. */
  291. if (pc) {
  292. if (unlikely(!atomic_inc_not_zero(&pc->ref_cnt))) {
  293. /* this page is under being uncharged ? */
  294. unlock_page_cgroup(page);
  295. cpu_relax();
  296. goto retry;
  297. } else {
  298. unlock_page_cgroup(page);
  299. goto done;
  300. }
  301. }
  302. unlock_page_cgroup(page);
  303. pc = kzalloc(sizeof(struct page_cgroup), gfp_mask);
  304. if (pc == NULL)
  305. goto err;
  306. rcu_read_lock();
  307. /*
  308. * We always charge the cgroup the mm_struct belongs to
  309. * the mm_struct's mem_cgroup changes on task migration if the
  310. * thread group leader migrates. It's possible that mm is not
  311. * set, if so charge the init_mm (happens for pagecache usage).
  312. */
  313. if (!mm)
  314. mm = &init_mm;
  315. mem = rcu_dereference(mm->mem_cgroup);
  316. /*
  317. * For every charge from the cgroup, increment reference
  318. * count
  319. */
  320. css_get(&mem->css);
  321. rcu_read_unlock();
  322. /*
  323. * If we created the page_cgroup, we should free it on exceeding
  324. * the cgroup limit.
  325. */
  326. while (res_counter_charge(&mem->res, PAGE_SIZE)) {
  327. bool is_atomic = gfp_mask & GFP_ATOMIC;
  328. /*
  329. * We cannot reclaim under GFP_ATOMIC, fail the charge
  330. */
  331. if (is_atomic)
  332. goto noreclaim;
  333. if (try_to_free_mem_cgroup_pages(mem, gfp_mask))
  334. continue;
  335. /*
  336. * try_to_free_mem_cgroup_pages() might not give us a full
  337. * picture of reclaim. Some pages are reclaimed and might be
  338. * moved to swap cache or just unmapped from the cgroup.
  339. * Check the limit again to see if the reclaim reduced the
  340. * current usage of the cgroup before giving up
  341. */
  342. if (res_counter_check_under_limit(&mem->res))
  343. continue;
  344. /*
  345. * Since we control both RSS and cache, we end up with a
  346. * very interesting scenario where we end up reclaiming
  347. * memory (essentially RSS), since the memory is pushed
  348. * to swap cache, we eventually end up adding those
  349. * pages back to our list. Hence we give ourselves a
  350. * few chances before we fail
  351. */
  352. else if (nr_retries--) {
  353. congestion_wait(WRITE, HZ/10);
  354. continue;
  355. }
  356. noreclaim:
  357. css_put(&mem->css);
  358. if (!is_atomic)
  359. mem_cgroup_out_of_memory(mem, GFP_KERNEL);
  360. goto free_pc;
  361. }
  362. atomic_set(&pc->ref_cnt, 1);
  363. pc->mem_cgroup = mem;
  364. pc->page = page;
  365. if (page_cgroup_assign_new_page_cgroup(page, pc)) {
  366. /*
  367. * an another charge is added to this page already.
  368. * we do take lock_page_cgroup(page) again and read
  369. * page->cgroup, increment refcnt.... just retry is OK.
  370. */
  371. res_counter_uncharge(&mem->res, PAGE_SIZE);
  372. css_put(&mem->css);
  373. kfree(pc);
  374. goto retry;
  375. }
  376. spin_lock_irqsave(&mem->lru_lock, flags);
  377. list_add(&pc->lru, &mem->active_list);
  378. spin_unlock_irqrestore(&mem->lru_lock, flags);
  379. done:
  380. return 0;
  381. free_pc:
  382. kfree(pc);
  383. err:
  384. return -ENOMEM;
  385. }
  386. /*
  387. * See if the cached pages should be charged at all?
  388. */
  389. int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
  390. gfp_t gfp_mask)
  391. {
  392. struct mem_cgroup *mem;
  393. if (!mm)
  394. mm = &init_mm;
  395. mem = rcu_dereference(mm->mem_cgroup);
  396. if (mem->control_type == MEM_CGROUP_TYPE_ALL)
  397. return mem_cgroup_charge(page, mm, gfp_mask);
  398. else
  399. return 0;
  400. }
  401. /*
  402. * Uncharging is always a welcome operation, we never complain, simply
  403. * uncharge.
  404. */
  405. void mem_cgroup_uncharge(struct page_cgroup *pc)
  406. {
  407. struct mem_cgroup *mem;
  408. struct page *page;
  409. unsigned long flags;
  410. /*
  411. * This can handle cases when a page is not charged at all and we
  412. * are switching between handling the control_type.
  413. */
  414. if (!pc)
  415. return;
  416. if (atomic_dec_and_test(&pc->ref_cnt)) {
  417. page = pc->page;
  418. /*
  419. * get page->cgroup and clear it under lock.
  420. */
  421. if (clear_page_cgroup(page, pc) == pc) {
  422. mem = pc->mem_cgroup;
  423. css_put(&mem->css);
  424. res_counter_uncharge(&mem->res, PAGE_SIZE);
  425. spin_lock_irqsave(&mem->lru_lock, flags);
  426. list_del_init(&pc->lru);
  427. spin_unlock_irqrestore(&mem->lru_lock, flags);
  428. kfree(pc);
  429. } else {
  430. /*
  431. * Note:This will be removed when force-empty patch is
  432. * applied. just show warning here.
  433. */
  434. printk(KERN_ERR "Race in mem_cgroup_uncharge() ?");
  435. dump_stack();
  436. }
  437. }
  438. }
  439. int mem_cgroup_write_strategy(char *buf, unsigned long long *tmp)
  440. {
  441. *tmp = memparse(buf, &buf);
  442. if (*buf != '\0')
  443. return -EINVAL;
  444. /*
  445. * Round up the value to the closest page size
  446. */
  447. *tmp = ((*tmp + PAGE_SIZE - 1) >> PAGE_SHIFT) << PAGE_SHIFT;
  448. return 0;
  449. }
  450. static ssize_t mem_cgroup_read(struct cgroup *cont,
  451. struct cftype *cft, struct file *file,
  452. char __user *userbuf, size_t nbytes, loff_t *ppos)
  453. {
  454. return res_counter_read(&mem_cgroup_from_cont(cont)->res,
  455. cft->private, userbuf, nbytes, ppos,
  456. NULL);
  457. }
  458. static ssize_t mem_cgroup_write(struct cgroup *cont, struct cftype *cft,
  459. struct file *file, const char __user *userbuf,
  460. size_t nbytes, loff_t *ppos)
  461. {
  462. return res_counter_write(&mem_cgroup_from_cont(cont)->res,
  463. cft->private, userbuf, nbytes, ppos,
  464. mem_cgroup_write_strategy);
  465. }
  466. static ssize_t mem_control_type_write(struct cgroup *cont,
  467. struct cftype *cft, struct file *file,
  468. const char __user *userbuf,
  469. size_t nbytes, loff_t *pos)
  470. {
  471. int ret;
  472. char *buf, *end;
  473. unsigned long tmp;
  474. struct mem_cgroup *mem;
  475. mem = mem_cgroup_from_cont(cont);
  476. buf = kmalloc(nbytes + 1, GFP_KERNEL);
  477. ret = -ENOMEM;
  478. if (buf == NULL)
  479. goto out;
  480. buf[nbytes] = 0;
  481. ret = -EFAULT;
  482. if (copy_from_user(buf, userbuf, nbytes))
  483. goto out_free;
  484. ret = -EINVAL;
  485. tmp = simple_strtoul(buf, &end, 10);
  486. if (*end != '\0')
  487. goto out_free;
  488. if (tmp <= MEM_CGROUP_TYPE_UNSPEC || tmp >= MEM_CGROUP_TYPE_MAX)
  489. goto out_free;
  490. mem->control_type = tmp;
  491. ret = nbytes;
  492. out_free:
  493. kfree(buf);
  494. out:
  495. return ret;
  496. }
  497. static ssize_t mem_control_type_read(struct cgroup *cont,
  498. struct cftype *cft,
  499. struct file *file, char __user *userbuf,
  500. size_t nbytes, loff_t *ppos)
  501. {
  502. unsigned long val;
  503. char buf[64], *s;
  504. struct mem_cgroup *mem;
  505. mem = mem_cgroup_from_cont(cont);
  506. s = buf;
  507. val = mem->control_type;
  508. s += sprintf(s, "%lu\n", val);
  509. return simple_read_from_buffer((void __user *)userbuf, nbytes,
  510. ppos, buf, s - buf);
  511. }
  512. static struct cftype mem_cgroup_files[] = {
  513. {
  514. .name = "usage_in_bytes",
  515. .private = RES_USAGE,
  516. .read = mem_cgroup_read,
  517. },
  518. {
  519. .name = "limit_in_bytes",
  520. .private = RES_LIMIT,
  521. .write = mem_cgroup_write,
  522. .read = mem_cgroup_read,
  523. },
  524. {
  525. .name = "failcnt",
  526. .private = RES_FAILCNT,
  527. .read = mem_cgroup_read,
  528. },
  529. {
  530. .name = "control_type",
  531. .write = mem_control_type_write,
  532. .read = mem_control_type_read,
  533. },
  534. };
  535. static struct mem_cgroup init_mem_cgroup;
  536. static struct cgroup_subsys_state *
  537. mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
  538. {
  539. struct mem_cgroup *mem;
  540. if (unlikely((cont->parent) == NULL)) {
  541. mem = &init_mem_cgroup;
  542. init_mm.mem_cgroup = mem;
  543. } else
  544. mem = kzalloc(sizeof(struct mem_cgroup), GFP_KERNEL);
  545. if (mem == NULL)
  546. return NULL;
  547. res_counter_init(&mem->res);
  548. INIT_LIST_HEAD(&mem->active_list);
  549. INIT_LIST_HEAD(&mem->inactive_list);
  550. spin_lock_init(&mem->lru_lock);
  551. mem->control_type = MEM_CGROUP_TYPE_ALL;
  552. return &mem->css;
  553. }
  554. static void mem_cgroup_destroy(struct cgroup_subsys *ss,
  555. struct cgroup *cont)
  556. {
  557. kfree(mem_cgroup_from_cont(cont));
  558. }
  559. static int mem_cgroup_populate(struct cgroup_subsys *ss,
  560. struct cgroup *cont)
  561. {
  562. return cgroup_add_files(cont, ss, mem_cgroup_files,
  563. ARRAY_SIZE(mem_cgroup_files));
  564. }
  565. static void mem_cgroup_move_task(struct cgroup_subsys *ss,
  566. struct cgroup *cont,
  567. struct cgroup *old_cont,
  568. struct task_struct *p)
  569. {
  570. struct mm_struct *mm;
  571. struct mem_cgroup *mem, *old_mem;
  572. mm = get_task_mm(p);
  573. if (mm == NULL)
  574. return;
  575. mem = mem_cgroup_from_cont(cont);
  576. old_mem = mem_cgroup_from_cont(old_cont);
  577. if (mem == old_mem)
  578. goto out;
  579. /*
  580. * Only thread group leaders are allowed to migrate, the mm_struct is
  581. * in effect owned by the leader
  582. */
  583. if (p->tgid != p->pid)
  584. goto out;
  585. css_get(&mem->css);
  586. rcu_assign_pointer(mm->mem_cgroup, mem);
  587. css_put(&old_mem->css);
  588. out:
  589. mmput(mm);
  590. return;
  591. }
  592. struct cgroup_subsys mem_cgroup_subsys = {
  593. .name = "memory",
  594. .subsys_id = mem_cgroup_subsys_id,
  595. .create = mem_cgroup_create,
  596. .destroy = mem_cgroup_destroy,
  597. .populate = mem_cgroup_populate,
  598. .attach = mem_cgroup_move_task,
  599. .early_init = 1,
  600. };