linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johan MOSSBERG <johan.xx.mossberg@stericsson.com>
To: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: RE: [PATCH 0/3] hwmem: Hardware memory driver
Date: Wed, 17 Nov 2010 10:28:13 +0100	[thread overview]
Message-ID: <C832F8F5D375BD43BFA11E82E0FE9FE0081BE73D53@EXDCVYMBSTM005.EQ1STM.local> (raw)
In-Reply-To: <op.vl9xudve7p4s8u@pikus>

Michał Nazarewicz wrote: 
> Do you want to remap user space mappings when page is moved during
> defragmentation? Or would user need to unmap the region?  Ie. would
> mmap()ed buffer be pinned?

Remap, i.e. not pinned. That means that the mapper needs to be
informed before and after a buffer is moved. Maybe add a function
to CMA where you can register a callback function that is called
before and after a buffer is moved? The callback function's
parameters would be buffer, new position and whether it will be
moved or has been moved. CMA would also need this type of
information to be able to evict temporary data from the
destination.

I'm a little bit worried that this approach put constraints on the
defragmentation algorithm but I can't think of any scenario where
we would run into problems. If a defragmentation algorithm does
temporary moves, and knows it at the time of the move, we would
have to add a flag to the callback that indicates that the move is
temporary so that it is not unnecessarily mapped, but that can be
done when/if the problem occurs. Temporarily moving a buffer to
scattered memory is not supported either but I suppose that can be
solved by adding a flag that indicates that the new position is
scattered, also something that can be done when needed.

/Johan Mossberg

  reply	other threads:[~2010-11-17  9:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 13:07 Johan Mossberg
2010-11-16 13:08 ` [PATCH 1/3] hwmem: Add hwmem (part 1) Johan Mossberg
2010-11-16 13:08   ` [PATCH 2/3] hwmem: Add hwmem (part 2) Johan Mossberg
2010-11-16 13:08     ` [PATCH 3/3] hwmem: Add hwmem to ux500 and mop500 Johan Mossberg
2010-11-16 14:50 ` [PATCH 0/3] hwmem: Hardware memory driver Michał Nazarewicz
2010-11-16 15:25   ` Johan MOSSBERG
2010-11-16 15:33     ` Michał Nazarewicz
2010-11-16 16:16       ` Johan MOSSBERG
2010-11-16 17:36         ` Michał Nazarewicz
2010-11-17  9:28           ` Johan MOSSBERG [this message]
2010-11-19 10:44             ` Michał Nazarewicz
2010-11-19 13:47               ` Johan MOSSBERG

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C832F8F5D375BD43BFA11E82E0FE9FE0081BE73D53@EXDCVYMBSTM005.EQ1STM.local \
    --to=johan.xx.mossberg@stericsson.com \
    --cc=linux-mm@kvack.org \
    --cc=m.nazarewicz@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox