diff for duplicates of <1489533213.2733.33.camel@linux.intel.com> diff --git a/a/1.txt b/N1/1.txt index d5d7dff..41acc65 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -2,10 +2,10 @@ On Wed, 2017-03-08 at 15:26 +0800, Huang, Ying wrote: > From: Huang Ying <ying.huang@intel.com> > > The swap cluster allocation/free functions are added based on the -> existing swap cluster management mechanism for SSD.A A These functions +> existing swap cluster management mechanism for SSD. These functions > don't work for the rotating hard disks because the existing swap cluster -> management mechanism doesn't work for them.A A The hard disks support may -> be added if someone really need it.A A But that needn't be included in +> management mechanism doesn't work for them. The hard disks support may +> be added if someone really need it. But that needn't be included in > this patchset. > > This will be used for the THP (Transparent Huge Page) swap support. @@ -19,17 +19,17 @@ On Wed, 2017-03-08 at 15:26 +0800, Huang, Ying wrote: > Cc: Rik van Riel <riel@redhat.com> > Signed-off-by: "Huang, Ying" <ying.huang@intel.com> > --- -> A mm/swapfile.c | 217 +++++++++++++++++++++++++++++++++++++++++----------------- -> A 1 file changed, 156 insertions(+), 61 deletions(-) +> mm/swapfile.c | 217 +++++++++++++++++++++++++++++++++++++++++----------------- +> 1 file changed, 156 insertions(+), 61 deletions(-) > > diff --git a/mm/swapfile.c b/mm/swapfile.c > index a744604384ff..91876c33114b 100644 > --- a/mm/swapfile.c > +++ b/mm/swapfile.c > @@ -378,6 +378,14 @@ static void swap_cluster_schedule_discard(struct swap_info_struct *si, -> A schedule_work(&si->discard_work); -> A } -> A +> schedule_work(&si->discard_work); +> } +> > +static void __free_cluster(struct swap_info_struct *si, unsigned long idx) > +{ > + struct swap_cluster_info *ci = si->cluster_info; @@ -38,31 +38,25 @@ On Wed, 2017-03-08 at 15:26 +0800, Huang, Ying wrote: > + cluster_list_add_tail(&si->free_clusters, ci, idx); > +} > + -> A /* -> A * Doing discard actually. After a cluster discard is finished, the cluster -> A * will be added to free cluster list. caller should hold si->lock. +> /* +> * Doing discard actually. After a cluster discard is finished, the cluster +> * will be added to free cluster list. caller should hold si->lock. > @@ -398,10 +406,7 @@ static void swap_do_scheduled_discard(struct swap_info_struct *si) -> A -> A spin_lock(&si->lock); -> A ci = lock_cluster(si, idx * SWAPFILE_CLUSTER); +> +> spin_lock(&si->lock); +> ci = lock_cluster(si, idx * SWAPFILE_CLUSTER); > - cluster_set_flag(ci, CLUSTER_FLAG_FREE); > - unlock_cluster(ci); > - cluster_list_add_tail(&si->free_clusters, info, idx); > - ci = lock_cluster(si, idx * SWAPFILE_CLUSTER); > + __free_cluster(si, idx); -> A memset(si->swap_map + idx * SWAPFILE_CLUSTER, -> A 0, SWAPFILE_CLUSTER); -> A unlock_cluster(ci); +> memset(si->swap_map + idx * SWAPFILE_CLUSTER, +> 0, SWAPFILE_CLUSTER); +> unlock_cluster(ci); The __free_cluster definition and the above change to eliminate the extra unlock_cluster and lock_cluster can perhaps be broken up -as a separate patch. A It can be independent of THP changes. +as a separate patch. It can be independent of THP changes. Tim - --- -To unsubscribe, send a message with 'unsubscribe linux-mm' in -the body to majordomo@kvack.org. For more info on Linux MM, -see: http://www.linux-mm.org/ . -Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N1/content_digest index 5507c06..c999789 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -20,10 +20,10 @@ "> From: Huang Ying <ying.huang@intel.com>\n" "> \n" "> The swap cluster allocation/free functions are added based on the\n" - "> existing swap cluster management mechanism for SSD.A A These functions\n" + "> existing swap cluster management mechanism for SSD.\302\240\302\240These functions\n" "> don't work for the rotating hard disks because the existing swap cluster\n" - "> management mechanism doesn't work for them.A A The hard disks support may\n" - "> be added if someone really need it.A A But that needn't be included in\n" + "> management mechanism doesn't work for them.\302\240\302\240The hard disks support may\n" + "> be added if someone really need it.\302\240\302\240But that needn't be included in\n" "> this patchset.\n" "> \n" "> This will be used for the THP (Transparent Huge Page) swap support.\n" @@ -37,17 +37,17 @@ "> Cc: Rik van Riel <riel@redhat.com>\n" "> Signed-off-by: \"Huang, Ying\" <ying.huang@intel.com>\n" "> ---\n" - "> A mm/swapfile.c | 217 +++++++++++++++++++++++++++++++++++++++++-----------------\n" - "> A 1 file changed, 156 insertions(+), 61 deletions(-)\n" + "> \302\240mm/swapfile.c | 217 +++++++++++++++++++++++++++++++++++++++++-----------------\n" + "> \302\2401 file changed, 156 insertions(+), 61 deletions(-)\n" "> \n" "> diff --git a/mm/swapfile.c b/mm/swapfile.c\n" "> index a744604384ff..91876c33114b 100644\n" "> --- a/mm/swapfile.c\n" "> +++ b/mm/swapfile.c\n" "> @@ -378,6 +378,14 @@ static void swap_cluster_schedule_discard(struct swap_info_struct *si,\n" - "> A \tschedule_work(&si->discard_work);\n" - "> A }\n" - "> A \n" + "> \302\240\tschedule_work(&si->discard_work);\n" + "> \302\240}\n" + "> \302\240\n" "> +static void __free_cluster(struct swap_info_struct *si, unsigned long idx)\n" "> +{\n" "> +\tstruct swap_cluster_info *ci = si->cluster_info;\n" @@ -56,33 +56,27 @@ "> +\tcluster_list_add_tail(&si->free_clusters, ci, idx);\n" "> +}\n" "> +\n" - "> A /*\n" - "> A * Doing discard actually. After a cluster discard is finished, the cluster\n" - "> A * will be added to free cluster list. caller should hold si->lock.\n" + "> \302\240/*\n" + "> \302\240 * Doing discard actually. After a cluster discard is finished, the cluster\n" + "> \302\240 * will be added to free cluster list. caller should hold si->lock.\n" "> @@ -398,10 +406,7 @@ static void swap_do_scheduled_discard(struct swap_info_struct *si)\n" - "> A \n" - "> A \t\tspin_lock(&si->lock);\n" - "> A \t\tci = lock_cluster(si, idx * SWAPFILE_CLUSTER);\n" + "> \302\240\n" + "> \302\240\t\tspin_lock(&si->lock);\n" + "> \302\240\t\tci = lock_cluster(si, idx * SWAPFILE_CLUSTER);\n" "> -\t\tcluster_set_flag(ci, CLUSTER_FLAG_FREE);\n" "> -\t\tunlock_cluster(ci);\n" "> -\t\tcluster_list_add_tail(&si->free_clusters, info, idx);\n" "> -\t\tci = lock_cluster(si, idx * SWAPFILE_CLUSTER);\n" "> +\t\t__free_cluster(si, idx);\n" - "> A \t\tmemset(si->swap_map + idx * SWAPFILE_CLUSTER,\n" - "> A \t\t\t\t0, SWAPFILE_CLUSTER);\n" - "> A \t\tunlock_cluster(ci);\n" + "> \302\240\t\tmemset(si->swap_map + idx * SWAPFILE_CLUSTER,\n" + "> \302\240\t\t\t\t0, SWAPFILE_CLUSTER);\n" + "> \302\240\t\tunlock_cluster(ci);\n" "\n" "The __free_cluster definition and the above change to eliminate\n" "the extra unlock_cluster and lock_cluster can perhaps be broken up\n" - "as a separate patch. A It can be independent of THP changes.\n" + "as a separate patch. \302\240It can be independent of THP changes.\n" "\n" "\n" - "Tim\n" - "\n" - "--\n" - "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" - "the body to majordomo@kvack.org. For more info on Linux MM,\n" - "see: http://www.linux-mm.org/ .\n" - "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" + Tim -555b71ca171485ad9d5cb9a6f1b6c0d3ed0de6f42c8898097f8a60593f51e4ee +23888a25b5f6e1e704052c59ed12ef2c8a3a1b31a9e2721dc62294c592c1e61b
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.