Skip to contentSkip to conversation

mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 9, 2013

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 09 Jul 2013 16:20:17 -0700

The patch titled
Subject: mm: remove unused VM_<READfoo> macros and expand other in-place
has been removed from the -mm tree. Its filename was
mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Joe Perches <[email protected]>
Subject: mm: remove unused VM_<READfoo> macros and expand other in-place

These VM_<READfoo> macros aren't used very often and three of them aren't used at all.

Expand the ones that are used in-place, and remove all the now unused #define VM_<foo> macros.

VM_READHINTMASK, VM_NormalReadHint and VM_ClearReadHint were added just before 2.4 and appears have never been used.

---

 include/linux/mm.h |    6 ------
 mm/filemap.c       |    6 +++---
 mm/memory.c        |    2 +-
 mm/rmap.c          |    2 +-
 4 files changed, 5 insertions(+), 11 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place +0 -6
diff -puN include/linux/mm.h~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place include/linux/mm.h
@@ -151,12 +151,6 @@ extern unsigned int kobjsize(const void
 #define VM_STACK_FLAGS	(VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
 #endif
 
-#define VM_READHINTMASK			(VM_SEQ_READ | VM_RAND_READ)
-#define VM_ClearReadHint(v)		(v)->vm_flags &= ~VM_READHINTMASK
-#define VM_NormalReadHint(v)		(!((v)->vm_flags & VM_READHINTMASK))
-#define VM_SequentialReadHint(v)	((v)->vm_flags & VM_SEQ_READ)
-#define VM_RandomReadHint(v)		((v)->vm_flags & VM_RAND_READ)
-
 /*
  * Special vmas that are non-mergable, non-mlock()able.
  * Note: mm/huge_memory.c VM_NO_THP depends on this definition.
mm/filemap.c renamed from mm/filemap.c~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place +3 -3
diff -puN mm/filemap.c~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place mm/filemap.c
@@ -1539,12 +1539,12 @@ static void do_sync_mmap_readahead(struc
 	struct address_space *mapping = file->f_mapping;
 
 	/* If we don't want any read-ahead, don't bother */
-	if (VM_RandomReadHint(vma))
+	if (vma->vm_flags & VM_RAND_READ)
 		return;
 	if (!ra->ra_pages)
 		return;
 
-	if (VM_SequentialReadHint(vma)) {
+	if (vma->vm_flags & VM_SEQ_READ) {
 		page_cache_sync_readahead(mapping, ra, file, offset,
 					  ra->ra_pages);
 		return;
@@ -1584,7 +1584,7 @@ static void do_async_mmap_readahead(stru
 	struct address_space *mapping = file->f_mapping;
 
 	/* If we don't want any read-ahead, don't bother */
-	if (VM_RandomReadHint(vma))
+	if (vma->vm_flags & VM_RAND_READ)
 		return;
 	if (ra->mmap_miss > 0)
 		ra->mmap_miss--;
mm/memory.c renamed from mm/memory.c~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place +1 -1
diff -puN mm/memory.c~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place mm/memory.c
@@ -1150,7 +1150,7 @@ again:
 				if (pte_dirty(ptent))
 					set_page_dirty(page);
 				if (pte_young(ptent) &&
-				    likely(!VM_SequentialReadHint(vma)))
+				    likely(!(vma->vm_flags & VM_SEQ_READ)))
 					mark_page_accessed(page);
 				rss[MM_FILEPAGES]--;
 			}
mm/rmap.c renamed from mm/rmap.c~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place +1 -1
diff -puN mm/rmap.c~mm-remove-unused-vm_readfoo-macros-and-expand-other-in-place mm/rmap.c
@@ -720,7 +720,7 @@ int page_referenced_one(struct page *pag
 			 * mapping is already gone, the unmap path will have
 			 * set PG_referenced or activated the page.
 			 */
-			if (likely(!VM_SequentialReadHint(vma)))
+			if (likely(!(vma->vm_flags & VM_SEQ_READ)))
 				referenced++;
 		}
 		pte_unmap_unlock(pte, ptl);

_

Patches currently in -mm which might be from [email protected] are

origin.patch
zbud-add-to-mm.patch
zswap-add-to-mm.patch
zswap-add-documentation.patch
linux-next.patch