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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151022141111.GA2914@redhat.com>
Date:	Thu, 22 Oct 2015 10:11:11 -0400
From:	Jerome Glisse <jglisse@...hat.com>
To:	Randy Dunlap <rdunlap@...radead.org>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Linus Torvalds <torvalds@...ux-foundation.org>,
	joro@...tes.org, Mel Gorman <mgorman@...e.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Johannes Weiner <jweiner@...hat.com>,
	Larry Woodman <lwoodman@...hat.com>,
	Rik van Riel <riel@...hat.com>,
	Dave Airlie <airlied@...hat.com>,
	Brendan Conoboy <blc@...hat.com>,
	Joe Donohue <jdonohue@...hat.com>,
	Christophe Harle <charle@...dia.com>,
	Duncan Poole <dpoole@...dia.com>,
	Sherry Cheung <SCheung@...dia.com>,
	Subhash Gutti <sgutti@...dia.com>,
	John Hubbard <jhubbard@...dia.com>,
	Mark Hairgrove <mhairgrove@...dia.com>,
	Lucien Dunning <ldunning@...dia.com>,
	Cameron Buschardt <cabuschardt@...dia.com>,
	Arvind Gopalakrishnan <arvindg@...dia.com>,
	Haggai Eran <haggaie@...lanox.com>,
	Shachar Raindel <raindel@...lanox.com>,
	Liran Liss <liranl@...lanox.com>,
	Roland Dreier <roland@...estorage.com>,
	Ben Sander <ben.sander@....com>,
	Greg Stoner <Greg.Stoner@....com>,
	John Bridgman <John.Bridgman@....com>,
	Michael Mantor <Michael.Mantor@....com>,
	Paul Blinzer <Paul.Blinzer@....com>,
	Leonid Shamis <Leonid.Shamis@....com>,
	Laurent Morichetti <Laurent.Morichetti@....com>,
	Alexander Deucher <Alexander.Deucher@....com>
Subject: Re: [PATCH v11 15/15] HMM: add documentation explaining HMM
 internals and how to use it.

On Wed, Oct 21, 2015 at 08:23:41PM -0700, Randy Dunlap wrote:
> Hi,
> 
> Some corrections and a few questions...

Thanks for the corrections. Answer below.

> On 10/21/15 14:00, Jérôme Glisse wrote:
> > This add documentation on how HMM works and a more in depth view of how it
> > should be use by device driver writers.
> > 
> > Signed-off-by: Jérôme Glisse <jglisse@...hat.com>

[...]

> > +synchronizing device page table for range that the device driver explicitly ask
> 
>                                        ranges                                  asks
> 
> or is only one range supported?

Several ranges are supported.


[...]

> > +  /* Mirror memory (in read mode) between addressA and addressB */
> > +  your_hmm_event->hmm_event.start = addressA;
> > +  your_hmm_event->hmm_event.end = addressB;
> 
> Multiple events (ranges) can be specified?

Device driver have to make one call per range but multiple threads can make
concurrent call for different ranges.

> Is hmm_event.end (addressB) included or excluded from the range?

Forgot to copy comment from header file, start is inclusive, end is exclusive.


[...]

> > +  struct hmm_pt_iter iter;
> > +  hmm_pt_iter_init(&iter, &mirror->pt)
> > +
> > +  /* Get pointer to HMM page table entry for a given address. */
> > +  dma_addr_t *hmm_pte;
> > +  hmm_pte = hmm_pt_iter_walk(&iter, &addr, &next);
> 
> what are 'addr' and 'next'? (types)

unsigned long will add then to the doc, good point.

[...]


> > +  /* Migrate system memory between addressA and addressB to device memory. */
> > +  your_hmm_event->hmm_event.start = addressA;
> > +  your_hmm_event->hmm_event.end = addressB;
> 
> is hmm_event.end (addressB) inclusive and exclusive?
> i.e., is it end_of_copy + 1?
> i.e., is the size of the copy addressB - addressA or
>       addressB - addressA + 1?
> i.e., is addressB = addressA + size
> or is    addressB = addressA + size - 1

Exclusive last one.


> In my experience it is usually better to have a start_address and size
> instead of start_address and end_address.

I switched several time btw the 2 offer differents version of the patchset,
it is something that can be change down the road unless you have strong
feeling about it.

Cheers,
Jérôme
--
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