Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbaJAUU5 (ORCPT ); Wed, 1 Oct 2014 16:20:57 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:44884 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165AbaJAUUz (ORCPT ); Wed, 1 Oct 2014 16:20:55 -0400 MIME-Version: 1.0 In-Reply-To: References: <20140930033327.GA14558@redhat.com> <20140930043309.GA16196@redhat.com> <20140930160510.GA15903@redhat.com> <20140930162201.GC15903@redhat.com> <20140930164047.GA18354@redhat.com> <20140930182059.GA24431@redhat.com> Date: Wed, 1 Oct 2014 13:20:53 -0700 X-Google-Sender-Auth: xvM6Yf7aeH3Re8Zn_Lh0gmEuKzU Message-ID: Subject: Re: pipe/page fault oddness. From: Linus Torvalds To: Hugh Dickins Cc: Dave Jones , Al Viro , Linux Kernel , Rik van Riel , Ingo Molnar , Michel Lespinasse , "Kirill A. Shutemov" , Mel Gorman , Sasha Levin Content-Type: multipart/mixed; boundary=001a11c24e80a2dc410504623c03 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --001a11c24e80a2dc410504623c03 Content-Type: text/plain; charset=UTF-8 On Wed, Oct 1, 2014 at 9:18 AM, Linus Torvalds wrote: > > So I'd really suggest we do exactly that. Get rid of "pte_numa()" > entirely, get rid of "_PAGE_[BIT_]NUMA" entirely, and instead add a > "pte_protnone()" helper to check for the "protnone" case (which on x86 > is testing the _PAGE_PROTNONE bit, and on most other architectures is > just testing that the page has no access rights). > > Then we throw away "pte_mknuma()" and "pte_mknonnuma()" entirely, > because they are brainless sh*t, and we just use > > ptent = ptep_modify_prot_start(mm, addr, pte); > ptent = pte_modify(ptent, newprot); > ptep_modify_prot_commit(mm, addr, pte, ptent); > > reliably instead (where for the mknuma case "newprot" is PROT_NONE, > and for mknonnuma() it is vma->vm_page_prot. Yes, that means that you > have to pass in the vma to those functions, but that just makes sense > anyway. > > And if that means that we lose the numa flag on mprotect etc, nobody sane cares. So here is a *COMPLETELY UNTESTED* and probably seriously buggy first version of such a patch. It doesn't do the powerpc conversion, so somebody would need to check that eventually, but aside from that obvious issue, can people fix this up? Or comment on why it doesn't work. Now, I like this because it gets rid of the horrible PAGE_NUMA special cases, but it really seems to simplify things in general. Lookie here: 13 files changed, 74 insertions(+), 268 deletions(-) that's really mainly just the removal of odd and broken numa pte/pmd helper functions from that aren't needed any more because the normal "change protections" functions just DTRT automatically. Although there are actually a few other cases that got simpler too, so it's not *just* removal of those _PAGE_NUMA-specific helpers. One thing this does *not* remove is the special pte locking rule in the "change_*_range()" functions: they still take that broken "prot_numa" argument. HOWEVER, it isn't actually used for any page table modifications, the only reason for it existing is the hacky locking issue (see lock_pte_protection(), and the comment about races with the transhuge accesses). Now, I'll be honest: this patch *migth* just work, but I expect it to have some stupid problem. It compiles. I haven't even dared boot it, much less try any numa benchmarks that woudln't show anything sane on my machine anyway. So I'm really sending this patch out in the hope that it will get comments, fixup and possibly even testing by people who actually know the NUMA balancing code. Rik? Anybody? Linus --001a11c24e80a2dc410504623c03 Content-Type: text/plain; charset=US-ASCII; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i0r4axpa0 IGFyY2gveDg2L2luY2x1ZGUvYXNtL3BndGFibGUuaCAgICAgICB8ICAzMSArKysrKy0tCiBhcmNo L3g4Ni9pbmNsdWRlL2FzbS9wZ3RhYmxlX3R5cGVzLmggfCAgMjcgKy0tLS0tCiBhcmNoL3g4Ni9t bS9ndXAuYyAgICAgICAgICAgICAgICAgICAgfCAgIDQgKy0KIGluY2x1ZGUvYXNtLWdlbmVyaWMv cGd0YWJsZS5oICAgICAgICB8IDE1OSArKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LQogaW5jbHVkZS9saW51eC9odWdlX21tLmggICAgICAgICAgICAgIHwgICAzICstCiBpbml0L0tj b25maWcgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMTEgLS0tCiBtbS9ndXAuYyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgfCAgIDQgKy0KIG1tL2h1Z2VfbWVtb3J5LmMgICAgICAgICAg ICAgICAgICAgICB8ICA0MiArKystLS0tLS0KIG1tL21lbW9yeS5jICAgICAgICAgICAgICAgICAg ICAgICAgICB8ICAxNiArKy0tCiBtbS9tZW1wb2xpY3kuYyAgICAgICAgICAgICAgICAgICAgICAg fCAgIDIgKy0KIG1tL21pZ3JhdGUuYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgMSAtCiBt bS9tcHJvdGVjdC5jICAgICAgICAgICAgICAgICAgICAgICAgfCAgNDAgKysrLS0tLS0tCiBtbS9w Z3RhYmxlLWdlbmVyaWMuYyAgICAgICAgICAgICAgICAgfCAgIDIgLQogMTMgZmlsZXMgY2hhbmdl ZCwgNzQgaW5zZXJ0aW9ucygrKSwgMjY4IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2FyY2gv eDg2L2luY2x1ZGUvYXNtL3BndGFibGUuaCBiL2FyY2gveDg2L2luY2x1ZGUvYXNtL3BndGFibGUu aAppbmRleCBhYTk3YTA3MGYwOWYuLjBkNGVjM2E2MmZlZCAxMDA2NDQKLS0tIGEvYXJjaC94ODYv aW5jbHVkZS9hc20vcGd0YWJsZS5oCisrKyBiL2FyY2gveDg2L2luY2x1ZGUvYXNtL3BndGFibGUu aApAQCAtMjk5LDcgKzI5OSw3IEBAIHN0YXRpYyBpbmxpbmUgcG1kX3QgcG1kX21rd3JpdGUocG1k X3QgcG1kKQogCiBzdGF0aWMgaW5saW5lIHBtZF90IHBtZF9ta25vdHByZXNlbnQocG1kX3QgcG1k KQogewotCXJldHVybiBwbWRfY2xlYXJfZmxhZ3MocG1kLCBfUEFHRV9QUkVTRU5UKTsKKwlyZXR1 cm4gcG1kX2NsZWFyX2ZsYWdzKHBtZCwgX1BBR0VfU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vbm51bWEoZW50cnkpOwogCXNldF9wbWRfYXQodm1hLT52bV9tbSwgYWRk cmVzcywgcG1kcCwgcG1kX21rbm90cHJlc2VudChlbnRyeSkpOwogCWZsdXNoX3RsYl9yYW5nZSh2 bWEsIGFkZHJlc3MsIGFkZHJlc3MgKyBIUEFHRV9QTURfU0laRSk7CiB9Cg== --001a11c24e80a2dc410504623c03-- -- 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/