[...]
That will work.
work? IOW, not exporting ksm_add_mm() and not passing a flag to __ksm_enter() --
it would simply set MMF_VM_MERGEABLE ?
ksm_add_mm() is also used in prctl (kernel/sys.c). Do you want to make a
similar change there?
Yes.
+ *
+ * @vma: Pointer to vma
+ */
+void ksm_add_vma(struct vm_area_struct *vma)
+{
+ struct mm_struct *mm = vma->vm_mm;
+
+ if (test_bit(MMF_VM_MERGE_ANY, &mm->flags))
+ __ksm_add_vma(vma);
+}
+
+/**
+ * ksm_add_vmas - Mark all vma's of a process as mergeable
+ *
+ * @mm: Pointer to mm
+ */
+void ksm_add_vmas(struct mm_struct *mm)
I'd suggest calling this
I guess you forgot your name suggestion?
Yeah, I reconsidered because the first idea I had was not particularly
good. Maybe
ksm_enable_for_all_vmas()
But not so sure. If you think the "add" terminology is a good fit, keep
it like that.
Thanks for bearing with me :)
--
Thanks,
David / dhildenb