Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1164930
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 06/12] x86/mm: Enable and use the arch_pgd_init_late() method |
| Date | 2015-06-15 00:20 +0200 |
| Message-ID | <pBopY-127-9@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <pANqq-4YL-19@gated-at.bofh.it> <pANA6-5db-13@gated-at.bofh.it> <pAXJ8-3aQ-11@gated-at.bofh.it> <pBbj3-6oz-1@gated-at.bofh.it> <pBnaz-7tM-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/14, Oleg Nesterov wrote:
>
> So, unless you are going to remove pgd_lock altogether perhaps we can
> rely on it the same way
>
> mb();
> spin_unlock_wait(&pgd_lock);
> rmb();
>
>
> Avoids the barriers (and comments) on another side, but I can't say
> I really like this...
>
>
> So I won't argue with 2 mb's on both sides.
Or we can add
// A new child created before can miss the PGD updates,
// but we must see that child on the process list
read_lock(tasklist_lock);
read_unlock(tasklist_lock);
// We can miss a new child forked after read_unlock(),
// but then its parent must see all PGD updates right
// after it does write_unlock(tasklist);
for_each_process(p) {
before main for_each_process() loop in sync_global_pgds().
As for exec_mmap() we can rely on task_lock(), sync_global_pgds()
takes it too. The corner case is when exec changes the leader, so
exec_mmap/sync_global_pgds can take different locks. But in this
case we can rely on de_thread() (which takes tasklist for write)
by the same reason: either sync_global_pgds() will see the new
leader, or the new leader must see the updates.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 06/12] x86/mm: Enable and use the arch_pgd_init_late() method Oleg Nesterov <oleg@redhat.com> - 2015-06-13 19:50 +0200
Re: [PATCH 06/12] x86/mm: Enable and use the arch_pgd_init_late() method Oleg Nesterov <oleg@redhat.com> - 2015-06-14 23:00 +0200
Re: [PATCH 06/12] x86/mm: Enable and use the arch_pgd_init_late() method Oleg Nesterov <oleg@redhat.com> - 2015-06-15 00:20 +0200
csiph-web