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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 13 Aug 2015 09:37:37 +1000
From:	Julian Calaby <julian.calaby@...il.com>
To:	Boaz Harrosh <boaz@...xistor.com>, Christoph Hellwig <hch@....de>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>, axboe@...nel.dk,
	linux-mips@...ux-mips.org, linux-ia64@...r.kernel.org,
	linux-nvdimm@...1.01.org, David Howells <dhowells@...hat.com>,
	sparclinux <sparclinux@...r.kernel.org>,
	Hans-Christian Egtvedt <egtvedt@...fundet.no>,
	linux-arch@...r.kernel.org, linux-s390@...r.kernel.org,
	x86@...nel.org, David Woodhouse <dwmw2@...radead.org>,
	HÃ¥vard Skinnemoen <hskinnemoen@...il.com>,
	linux-xtensa@...ux-xtensa.org, grundler@...isc-linux.org,
	realmz6@...il.com, alex.williamson@...hat.com,
	linux-metag@...r.kernel.org, Michal Simek <monstr@...str.eu>,
	linux-parisc@...r.kernel.org, vgupta@...opsys.com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-alpha@...r.kernel.org,
	Linux Media Mailing List <linux-media@...r.kernel.org>,
	linuxppc-dev@...ts.ozlabs.org
Subject: Re: RFC: prepare for struct scatterlist entries without page backing

Hi,

On Wed, Aug 12, 2015 at 10:42 PM, Boaz Harrosh <boaz@...xistor.com> wrote:
> On 08/12/2015 10:05 AM, Christoph Hellwig wrote:
>> It turns out most DMA mapping implementation can handle SGLs without
>> page structures with some fairly simple mechanical work.  Most of it
>> is just about consistently using sg_phys.  For implementations that
>> need to flush caches we need a new helper that skips these cache
>> flushes if a entry doesn't have a kernel virtual address.
>>
>> However the ccio (parisc) and sba_iommu (parisc & ia64) IOMMUs seem
>> to be operate mostly on virtual addresses.  It's a fairly odd concept
>> that I don't fully grasp, so I'll need some help with those if we want
>> to bring this forward.
>>
>> Additional this series skips ARM entirely for now.  The reason is
>> that most arm implementations of the .map_sg operation just iterate
>> over all entries and call ->map_page for it, which means we'd need
>> to convert those to a ->map_pfn similar to Dan's previous approach.
>>
>
[snip]
>
> It is a bit of work but is worth while, and accelerating tremendously
> lots of workloads. Not like this abomination which only branches
> things more and more, and making things fatter and slower.

As a random guy reading a big bunch of patches on code I know almost
nothing about, parts of this comment really resonated with me:
overall, we seem to be adding a lot of if statements to code that
appears to be in a hot path.

I.e. ~90% of this patch set seems to be just mechanically dropping
BUG_ON()s and converting open coded stuff to use accessor functions
(which should be macros or get inlined, right?) - and the remaining
bit is not flushing if we don't have a physical page somewhere.

Would it make sense to split this patch set into a few bits: one to
drop all the useless BUG_ON()s, one to convert all the open coded
stuff to accessor functions, then another to do the actual page-less
sg stuff?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@...il.com
Profile: http://www.google.com/profiles/julian.calaby/
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ