faq.rst 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ==========================
  3. Frequently Asked Questions
  4. ==========================
  5. Why a new subsystem, instead of extending perf or other user space tools?
  6. =========================================================================
  7. First, because it needs to be lightweight as much as possible so that it can be
  8. used online, any unnecessary overhead such as kernel - user space context
  9. switching cost should be avoided. Second, DAMON aims to be used by other
  10. programs including the kernel. Therefore, having a dependency on specific
  11. tools like perf is not desirable. These are the two biggest reasons why DAMON
  12. is implemented in the kernel space.
  13. Can 'idle pages tracking' or 'perf mem' substitute DAMON?
  14. =========================================================
  15. Idle page tracking is a low level primitive for access check of the physical
  16. address space. 'perf mem' is similar, though it can use sampling to minimize
  17. the overhead. On the other hand, DAMON is a higher-level framework for the
  18. monitoring of various address spaces. It is focused on memory management
  19. optimization and provides sophisticated accuracy/overhead handling mechanisms.
  20. Therefore, 'idle pages tracking' and 'perf mem' could provide a subset of
  21. DAMON's output, but cannot substitute DAMON.
  22. Does DAMON support virtual memory only?
  23. =======================================
  24. No. The core of the DAMON is address space independent. The address space
  25. specific monitoring operations including monitoring target regions
  26. constructions and actual access checks can be implemented and configured on the
  27. DAMON core by the users. In this way, DAMON users can monitor any address
  28. space with any access check technique.
  29. Nonetheless, DAMON provides vma/rmap tracking and PTE Accessed bit check based
  30. implementations of the address space dependent functions for the virtual memory
  31. and the physical memory by default, for a reference and convenient use.
  32. Can I simply monitor page granularity?
  33. ======================================
  34. Yes. You can do so by setting the ``min_nr_regions`` attribute higher than the
  35. working set size divided by the page size. Because the monitoring target
  36. regions size is forced to be ``>=page size``, the region split will make no
  37. effect.