lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 17 Jun 2015 08:08:49 -0700 From: Andy Lutomirski <luto@...capital.net> To: Dan Williams <dan.j.williams@...el.com> Cc: Christoph Hellwig <hch@....de>, Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>, Ross Zwisler <ross.zwisler@...ux.intel.com>, Andrew Morton <akpm@...ux-foundation.org>, Juergen Gross <jgross@...e.com>, X86 ML <x86@...nel.org>, "Kani, Toshimitsu" <toshi.kani@...com>, "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>, Benjamin Herrenschmidt <benh@...nel.crashing.org>, Luis Rodriguez <mcgrof@...e.com>, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Stefan Bader <stefan.bader@...onical.com>, "linux-mm@...ck.org" <linux-mm@...ck.org>, Geert Uytterhoeven <geert@...ux-m68k.org>, Ralf Baechle <ralf@...ux-mips.org>, Henrique de Moraes Holschuh <hmh@....eng.br>, Michael Ellerman <mpe@...erman.id.au>, Tejun Heo <tj@...nel.org>, Paul Mackerras <paulus@...ba.org> Subject: Re: [PATCH v4 6/6] arch, x86: pmem api for ensuring durability of persistent memory updates On Wed, Jun 17, 2015 at 7:54 AM, Dan Williams <dan.j.williams@...el.com> wrote: > On Wed, Jun 17, 2015 at 4:31 AM, Christoph Hellwig <hch@....de> wrote: >> This mess with arch_ methods and an ops vecor is almost unreadable. >> >> What's the problem with having something like: >> >> pmem_foo() >> { >> if (arch_has_pmem) // or sync_pmem >> arch_pmem_foo(); >> generic_pmem_foo(); >> } >> >> This adds a branch at runtime, but that shoudn't really be any slower >> than an indirect call on architectures that matter. > > No doubt it's premature optimization, but it bothered me that we'll > end up calling cpuid perhaps multiple times every i/o. If it's just a > readability concern I could wrap it in helpers. Getting it upstream > is my primary concern at this point so I have no strong attachment to > the indirect calls if that's all that is preventing an ack. A cpuid per i/o would be a killer, but the cpufeature code is way smarter than that. You want static_cpu_has, though -- it's even faster, since it gets patched at boot time. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists