Re: [PATCH v3] mm/migrate_device: Try to handle swapcache pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


On 7.6.2023 17.10, Christoph Hellwig wrote:
On Tue, Jun 06, 2023 at 08:01:49AM +0300, mpenttil@xxxxxxxxxx wrote:
From: Mika Penttilä <mpenttil@xxxxxxxxxx>

Migrating file pages and swapcache pages into device memory is not supported.
The decision is done based on page_mapping(). For now, swapcache pages are not migrated.

Please fix the commit log formatting, it should not exceed 7 lines.

  		if (is_device_private_page(newpage) ||
  		    is_device_coherent_page(newpage)) {
-			/*
-			 * For now only support anonymous memory migrating to
-			 * device private or coherent memory.
-			 */
+
  			if (mapping) {

Very nitpicky, but this empty line looks odd.  Also isn't the comment
still (mostly) correct given that file backed memory is still not
supported?

Yes the comment is mostly correct and moved a few lines lower, complemented with a comment about the swap cache.


+				/*
+				 * For now only support anonymous memory migrating to
+				 * device private or coherent memory.
+				 *
+				 * Try to get rid of swap cache if possible.
+				 *
+				 */
+				if (!folio_test_anon(folio) || !folio_free_swap(folio)) {

Please avoid the overly long lines.


Thanks,
Mika





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux