From: kbuild test robot <lkp@intel.com>
Cc: "Ralph Campbell" <rcampbell@nvidia.com>,
"Jan Kara" <jack@suse.cz>,
kvm@vger.kernel.org, "Matthew Wilcox" <mawilcox@microsoft.com>,
linux-rdma@vger.kernel.org, "John Hubbard" <jhubbard@nvidia.com>,
"Christian Koenig" <christian.koenig@amd.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Michal Hocko" <mhocko@kernel.org>,
linux-mm@kvack.org, "Jérôme Glisse" <jglisse@redhat.com>,
kbuild-all@01.org, "Ross Zwisler" <zwisler@kernel.org>,
linux-fsdevel@vger.kernel.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Dan Williams" <dan.j.williams@intel.com>
Subject: Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls
Date: Fri, 7 Dec 2018 04:31:12 +0800 [thread overview]
Message-ID: <201812070424.joqmufq2%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181203201817.10759-3-jglisse@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3957 bytes --]
Hi Jérôme,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc5]
[cannot apply to next-20181206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/jglisse-redhat-com/mmu-notifier-contextual-informations/20181207-031930
config: x86_64-randconfig-x017-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
fs//proc/task_mmu.c: In function 'clear_refs_write':
>> fs//proc/task_mmu.c:1099:29: error: storage size of 'range' isn't known
struct mmu_notifier_range range;
^~~~~
fs//proc/task_mmu.c:1099:29: warning: unused variable 'range' [-Wunused-variable]
vim +1099 fs//proc/task_mmu.c
1069
1070 static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1071 size_t count, loff_t *ppos)
1072 {
1073 struct task_struct *task;
1074 char buffer[PROC_NUMBUF];
1075 struct mm_struct *mm;
1076 struct vm_area_struct *vma;
1077 enum clear_refs_types type;
1078 struct mmu_gather tlb;
1079 int itype;
1080 int rv;
1081
1082 memset(buffer, 0, sizeof(buffer));
1083 if (count > sizeof(buffer) - 1)
1084 count = sizeof(buffer) - 1;
1085 if (copy_from_user(buffer, buf, count))
1086 return -EFAULT;
1087 rv = kstrtoint(strstrip(buffer), 10, &itype);
1088 if (rv < 0)
1089 return rv;
1090 type = (enum clear_refs_types)itype;
1091 if (type < CLEAR_REFS_ALL || type >= CLEAR_REFS_LAST)
1092 return -EINVAL;
1093
1094 task = get_proc_task(file_inode(file));
1095 if (!task)
1096 return -ESRCH;
1097 mm = get_task_mm(task);
1098 if (mm) {
> 1099 struct mmu_notifier_range range;
1100 struct clear_refs_private cp = {
1101 .type = type,
1102 };
1103 struct mm_walk clear_refs_walk = {
1104 .pmd_entry = clear_refs_pte_range,
1105 .test_walk = clear_refs_test_walk,
1106 .mm = mm,
1107 .private = &cp,
1108 };
1109
1110 if (type == CLEAR_REFS_MM_HIWATER_RSS) {
1111 if (down_write_killable(&mm->mmap_sem)) {
1112 count = -EINTR;
1113 goto out_mm;
1114 }
1115
1116 /*
1117 * Writing 5 to /proc/pid/clear_refs resets the peak
1118 * resident set size to this mm's current rss value.
1119 */
1120 reset_mm_hiwater_rss(mm);
1121 up_write(&mm->mmap_sem);
1122 goto out_mm;
1123 }
1124
1125 down_read(&mm->mmap_sem);
1126 tlb_gather_mmu(&tlb, mm, 0, -1);
1127 if (type == CLEAR_REFS_SOFT_DIRTY) {
1128 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1129 if (!(vma->vm_flags & VM_SOFTDIRTY))
1130 continue;
1131 up_read(&mm->mmap_sem);
1132 if (down_write_killable(&mm->mmap_sem)) {
1133 count = -EINTR;
1134 goto out_mm;
1135 }
1136 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1137 vma->vm_flags &= ~VM_SOFTDIRTY;
1138 vma_set_page_prot(vma);
1139 }
1140 downgrade_write(&mm->mmap_sem);
1141 break;
1142 }
1143
1144 range.start = 0;
1145 range.end = -1UL;
1146 range.mm = mm;
1147 mmu_notifier_invalidate_range_start(&range);
1148 }
1149 walk_page_range(0, mm->highest_vm_end, &clear_refs_walk);
1150 if (type == CLEAR_REFS_SOFT_DIRTY)
1151 mmu_notifier_invalidate_range_end(&range);
1152 tlb_finish_mmu(&tlb, 0, -1);
1153 up_read(&mm->mmap_sem);
1154 out_mm:
1155 mmput(mm);
1156 }
1157 put_task_struct(task);
1158
1159 return count;
1160 }
1161
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25413 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: jglisse@redhat.com
Cc: kbuild-all@01.org, linux-mm@kvack.org,
"Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"Jérôme Glisse" <jglisse@redhat.com>,
"Matthew Wilcox" <mawilcox@microsoft.com>,
"Ross Zwisler" <zwisler@kernel.org>, "Jan Kara" <jack@suse.cz>,
"Dan Williams" <dan.j.williams@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Christian Koenig" <christian.koenig@amd.com>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Ralph Campbell" <rcampbell@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
kvm@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rdma@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls
Date: Fri, 7 Dec 2018 04:31:12 +0800 [thread overview]
Message-ID: <201812070424.joqmufq2%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181203201817.10759-3-jglisse@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3957 bytes --]
Hi Jérôme,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc5]
[cannot apply to next-20181206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/jglisse-redhat-com/mmu-notifier-contextual-informations/20181207-031930
config: x86_64-randconfig-x017-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
fs//proc/task_mmu.c: In function 'clear_refs_write':
>> fs//proc/task_mmu.c:1099:29: error: storage size of 'range' isn't known
struct mmu_notifier_range range;
^~~~~
fs//proc/task_mmu.c:1099:29: warning: unused variable 'range' [-Wunused-variable]
vim +1099 fs//proc/task_mmu.c
1069
1070 static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1071 size_t count, loff_t *ppos)
1072 {
1073 struct task_struct *task;
1074 char buffer[PROC_NUMBUF];
1075 struct mm_struct *mm;
1076 struct vm_area_struct *vma;
1077 enum clear_refs_types type;
1078 struct mmu_gather tlb;
1079 int itype;
1080 int rv;
1081
1082 memset(buffer, 0, sizeof(buffer));
1083 if (count > sizeof(buffer) - 1)
1084 count = sizeof(buffer) - 1;
1085 if (copy_from_user(buffer, buf, count))
1086 return -EFAULT;
1087 rv = kstrtoint(strstrip(buffer), 10, &itype);
1088 if (rv < 0)
1089 return rv;
1090 type = (enum clear_refs_types)itype;
1091 if (type < CLEAR_REFS_ALL || type >= CLEAR_REFS_LAST)
1092 return -EINVAL;
1093
1094 task = get_proc_task(file_inode(file));
1095 if (!task)
1096 return -ESRCH;
1097 mm = get_task_mm(task);
1098 if (mm) {
> 1099 struct mmu_notifier_range range;
1100 struct clear_refs_private cp = {
1101 .type = type,
1102 };
1103 struct mm_walk clear_refs_walk = {
1104 .pmd_entry = clear_refs_pte_range,
1105 .test_walk = clear_refs_test_walk,
1106 .mm = mm,
1107 .private = &cp,
1108 };
1109
1110 if (type == CLEAR_REFS_MM_HIWATER_RSS) {
1111 if (down_write_killable(&mm->mmap_sem)) {
1112 count = -EINTR;
1113 goto out_mm;
1114 }
1115
1116 /*
1117 * Writing 5 to /proc/pid/clear_refs resets the peak
1118 * resident set size to this mm's current rss value.
1119 */
1120 reset_mm_hiwater_rss(mm);
1121 up_write(&mm->mmap_sem);
1122 goto out_mm;
1123 }
1124
1125 down_read(&mm->mmap_sem);
1126 tlb_gather_mmu(&tlb, mm, 0, -1);
1127 if (type == CLEAR_REFS_SOFT_DIRTY) {
1128 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1129 if (!(vma->vm_flags & VM_SOFTDIRTY))
1130 continue;
1131 up_read(&mm->mmap_sem);
1132 if (down_write_killable(&mm->mmap_sem)) {
1133 count = -EINTR;
1134 goto out_mm;
1135 }
1136 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1137 vma->vm_flags &= ~VM_SOFTDIRTY;
1138 vma_set_page_prot(vma);
1139 }
1140 downgrade_write(&mm->mmap_sem);
1141 break;
1142 }
1143
1144 range.start = 0;
1145 range.end = -1UL;
1146 range.mm = mm;
1147 mmu_notifier_invalidate_range_start(&range);
1148 }
1149 walk_page_range(0, mm->highest_vm_end, &clear_refs_walk);
1150 if (type == CLEAR_REFS_SOFT_DIRTY)
1151 mmu_notifier_invalidate_range_end(&range);
1152 tlb_finish_mmu(&tlb, 0, -1);
1153 up_read(&mm->mmap_sem);
1154 out_mm:
1155 mmput(mm);
1156 }
1157 put_task_struct(task);
1158
1159 return count;
1160 }
1161
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25413 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: jglisse@redhat.com
Cc: kbuild-all@01.org, linux-mm@kvack.org,
"Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"Jérôme Glisse" <jglisse@redhat.com>,
"Matthew Wilcox" <mawilcox@microsoft.com>,
"Ross Zwisler" <zwisler@kernel.org>, "Jan Kara" <jack@suse.cz>,
"Dan Williams" <dan.j.williams@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Christian Koenig" <christian.koenig@amd.com>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Ralph Campbell" <rcampbell@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
kvm@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rdma@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls
Date: Fri, 7 Dec 2018 04:31:12 +0800 [thread overview]
Message-ID: <201812070424.joqmufq2%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181203201817.10759-3-jglisse@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3961 bytes --]
Hi J�r�me,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc5]
[cannot apply to next-20181206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/jglisse-redhat-com/mmu-notifier-contextual-informations/20181207-031930
config: x86_64-randconfig-x017-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
fs//proc/task_mmu.c: In function 'clear_refs_write':
>> fs//proc/task_mmu.c:1099:29: error: storage size of 'range' isn't known
struct mmu_notifier_range range;
^~~~~
fs//proc/task_mmu.c:1099:29: warning: unused variable 'range' [-Wunused-variable]
vim +1099 fs//proc/task_mmu.c
1069
1070 static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1071 size_t count, loff_t *ppos)
1072 {
1073 struct task_struct *task;
1074 char buffer[PROC_NUMBUF];
1075 struct mm_struct *mm;
1076 struct vm_area_struct *vma;
1077 enum clear_refs_types type;
1078 struct mmu_gather tlb;
1079 int itype;
1080 int rv;
1081
1082 memset(buffer, 0, sizeof(buffer));
1083 if (count > sizeof(buffer) - 1)
1084 count = sizeof(buffer) - 1;
1085 if (copy_from_user(buffer, buf, count))
1086 return -EFAULT;
1087 rv = kstrtoint(strstrip(buffer), 10, &itype);
1088 if (rv < 0)
1089 return rv;
1090 type = (enum clear_refs_types)itype;
1091 if (type < CLEAR_REFS_ALL || type >= CLEAR_REFS_LAST)
1092 return -EINVAL;
1093
1094 task = get_proc_task(file_inode(file));
1095 if (!task)
1096 return -ESRCH;
1097 mm = get_task_mm(task);
1098 if (mm) {
> 1099 struct mmu_notifier_range range;
1100 struct clear_refs_private cp = {
1101 .type = type,
1102 };
1103 struct mm_walk clear_refs_walk = {
1104 .pmd_entry = clear_refs_pte_range,
1105 .test_walk = clear_refs_test_walk,
1106 .mm = mm,
1107 .private = &cp,
1108 };
1109
1110 if (type == CLEAR_REFS_MM_HIWATER_RSS) {
1111 if (down_write_killable(&mm->mmap_sem)) {
1112 count = -EINTR;
1113 goto out_mm;
1114 }
1115
1116 /*
1117 * Writing 5 to /proc/pid/clear_refs resets the peak
1118 * resident set size to this mm's current rss value.
1119 */
1120 reset_mm_hiwater_rss(mm);
1121 up_write(&mm->mmap_sem);
1122 goto out_mm;
1123 }
1124
1125 down_read(&mm->mmap_sem);
1126 tlb_gather_mmu(&tlb, mm, 0, -1);
1127 if (type == CLEAR_REFS_SOFT_DIRTY) {
1128 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1129 if (!(vma->vm_flags & VM_SOFTDIRTY))
1130 continue;
1131 up_read(&mm->mmap_sem);
1132 if (down_write_killable(&mm->mmap_sem)) {
1133 count = -EINTR;
1134 goto out_mm;
1135 }
1136 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1137 vma->vm_flags &= ~VM_SOFTDIRTY;
1138 vma_set_page_prot(vma);
1139 }
1140 downgrade_write(&mm->mmap_sem);
1141 break;
1142 }
1143
1144 range.start = 0;
1145 range.end = -1UL;
1146 range.mm = mm;
1147 mmu_notifier_invalidate_range_start(&range);
1148 }
1149 walk_page_range(0, mm->highest_vm_end, &clear_refs_walk);
1150 if (type == CLEAR_REFS_SOFT_DIRTY)
1151 mmu_notifier_invalidate_range_end(&range);
1152 tlb_finish_mmu(&tlb, 0, -1);
1153 up_read(&mm->mmap_sem);
1154 out_mm:
1155 mmput(mm);
1156 }
1157 put_task_struct(task);
1158
1159 return count;
1160 }
1161
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25413 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: jglisse@redhat.com
Cc: "Ralph Campbell" <rcampbell@nvidia.com>,
"Jan Kara" <jack@suse.cz>,
kvm@vger.kernel.org, "Matthew Wilcox" <mawilcox@microsoft.com>,
linux-rdma@vger.kernel.org, "John Hubbard" <jhubbard@nvidia.com>,
"Christian Koenig" <christian.koenig@amd.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Michal Hocko" <mhocko@kernel.org>,
linux-mm@kvack.org, "Jérôme Glisse" <jglisse@redhat.com>,
kbuild-all@01.org, "Ross Zwisler" <zwisler@kernel.org>,
linux-fsdevel@vger.kernel.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Dan Williams" <dan.j.williams@intel.com>
Subject: Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls
Date: Fri, 7 Dec 2018 04:31:12 +0800 [thread overview]
Message-ID: <201812070424.joqmufq2%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181203201817.10759-3-jglisse@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3957 bytes --]
Hi Jérôme,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc5]
[cannot apply to next-20181206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/jglisse-redhat-com/mmu-notifier-contextual-informations/20181207-031930
config: x86_64-randconfig-x017-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
fs//proc/task_mmu.c: In function 'clear_refs_write':
>> fs//proc/task_mmu.c:1099:29: error: storage size of 'range' isn't known
struct mmu_notifier_range range;
^~~~~
fs//proc/task_mmu.c:1099:29: warning: unused variable 'range' [-Wunused-variable]
vim +1099 fs//proc/task_mmu.c
1069
1070 static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1071 size_t count, loff_t *ppos)
1072 {
1073 struct task_struct *task;
1074 char buffer[PROC_NUMBUF];
1075 struct mm_struct *mm;
1076 struct vm_area_struct *vma;
1077 enum clear_refs_types type;
1078 struct mmu_gather tlb;
1079 int itype;
1080 int rv;
1081
1082 memset(buffer, 0, sizeof(buffer));
1083 if (count > sizeof(buffer) - 1)
1084 count = sizeof(buffer) - 1;
1085 if (copy_from_user(buffer, buf, count))
1086 return -EFAULT;
1087 rv = kstrtoint(strstrip(buffer), 10, &itype);
1088 if (rv < 0)
1089 return rv;
1090 type = (enum clear_refs_types)itype;
1091 if (type < CLEAR_REFS_ALL || type >= CLEAR_REFS_LAST)
1092 return -EINVAL;
1093
1094 task = get_proc_task(file_inode(file));
1095 if (!task)
1096 return -ESRCH;
1097 mm = get_task_mm(task);
1098 if (mm) {
> 1099 struct mmu_notifier_range range;
1100 struct clear_refs_private cp = {
1101 .type = type,
1102 };
1103 struct mm_walk clear_refs_walk = {
1104 .pmd_entry = clear_refs_pte_range,
1105 .test_walk = clear_refs_test_walk,
1106 .mm = mm,
1107 .private = &cp,
1108 };
1109
1110 if (type == CLEAR_REFS_MM_HIWATER_RSS) {
1111 if (down_write_killable(&mm->mmap_sem)) {
1112 count = -EINTR;
1113 goto out_mm;
1114 }
1115
1116 /*
1117 * Writing 5 to /proc/pid/clear_refs resets the peak
1118 * resident set size to this mm's current rss value.
1119 */
1120 reset_mm_hiwater_rss(mm);
1121 up_write(&mm->mmap_sem);
1122 goto out_mm;
1123 }
1124
1125 down_read(&mm->mmap_sem);
1126 tlb_gather_mmu(&tlb, mm, 0, -1);
1127 if (type == CLEAR_REFS_SOFT_DIRTY) {
1128 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1129 if (!(vma->vm_flags & VM_SOFTDIRTY))
1130 continue;
1131 up_read(&mm->mmap_sem);
1132 if (down_write_killable(&mm->mmap_sem)) {
1133 count = -EINTR;
1134 goto out_mm;
1135 }
1136 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1137 vma->vm_flags &= ~VM_SOFTDIRTY;
1138 vma_set_page_prot(vma);
1139 }
1140 downgrade_write(&mm->mmap_sem);
1141 break;
1142 }
1143
1144 range.start = 0;
1145 range.end = -1UL;
1146 range.mm = mm;
1147 mmu_notifier_invalidate_range_start(&range);
1148 }
1149 walk_page_range(0, mm->highest_vm_end, &clear_refs_walk);
1150 if (type == CLEAR_REFS_SOFT_DIRTY)
1151 mmu_notifier_invalidate_range_end(&range);
1152 tlb_finish_mmu(&tlb, 0, -1);
1153 up_read(&mm->mmap_sem);
1154 out_mm:
1155 mmput(mm);
1156 }
1157 put_task_struct(task);
1158
1159 return count;
1160 }
1161
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25413 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: jglisse@redhat.com
Cc: kbuild-all@01.org, linux-mm@kvack.org,
"Andrew Morton" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"Matthew Wilcox" <mawilcox@microsoft.com>,
"Ross Zwisler" <zwisler@kernel.org>, "Jan Kara" <jack@suse.cz>,
"Dan Williams" <dan.j.williams@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Michal Hocko" <mhocko@kernel.org>,
"Christian Koenig" <christian.koenig@amd.com>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Ralph Campbell" <rcampbell@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
kvm@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rdma@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls
Date: Fri, 7 Dec 2018 04:31:12 +0800 [thread overview]
Message-ID: <201812070424.joqmufq2%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181203201817.10759-3-jglisse@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3961 bytes --]
Hi J�r�me,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc5]
[cannot apply to next-20181206]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/jglisse-redhat-com/mmu-notifier-contextual-informations/20181207-031930
config: x86_64-randconfig-x017-201848 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
fs//proc/task_mmu.c: In function 'clear_refs_write':
>> fs//proc/task_mmu.c:1099:29: error: storage size of 'range' isn't known
struct mmu_notifier_range range;
^~~~~
fs//proc/task_mmu.c:1099:29: warning: unused variable 'range' [-Wunused-variable]
vim +1099 fs//proc/task_mmu.c
1069
1070 static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1071 size_t count, loff_t *ppos)
1072 {
1073 struct task_struct *task;
1074 char buffer[PROC_NUMBUF];
1075 struct mm_struct *mm;
1076 struct vm_area_struct *vma;
1077 enum clear_refs_types type;
1078 struct mmu_gather tlb;
1079 int itype;
1080 int rv;
1081
1082 memset(buffer, 0, sizeof(buffer));
1083 if (count > sizeof(buffer) - 1)
1084 count = sizeof(buffer) - 1;
1085 if (copy_from_user(buffer, buf, count))
1086 return -EFAULT;
1087 rv = kstrtoint(strstrip(buffer), 10, &itype);
1088 if (rv < 0)
1089 return rv;
1090 type = (enum clear_refs_types)itype;
1091 if (type < CLEAR_REFS_ALL || type >= CLEAR_REFS_LAST)
1092 return -EINVAL;
1093
1094 task = get_proc_task(file_inode(file));
1095 if (!task)
1096 return -ESRCH;
1097 mm = get_task_mm(task);
1098 if (mm) {
> 1099 struct mmu_notifier_range range;
1100 struct clear_refs_private cp = {
1101 .type = type,
1102 };
1103 struct mm_walk clear_refs_walk = {
1104 .pmd_entry = clear_refs_pte_range,
1105 .test_walk = clear_refs_test_walk,
1106 .mm = mm,
1107 .private = &cp,
1108 };
1109
1110 if (type == CLEAR_REFS_MM_HIWATER_RSS) {
1111 if (down_write_killable(&mm->mmap_sem)) {
1112 count = -EINTR;
1113 goto out_mm;
1114 }
1115
1116 /*
1117 * Writing 5 to /proc/pid/clear_refs resets the peak
1118 * resident set size to this mm's current rss value.
1119 */
1120 reset_mm_hiwater_rss(mm);
1121 up_write(&mm->mmap_sem);
1122 goto out_mm;
1123 }
1124
1125 down_read(&mm->mmap_sem);
1126 tlb_gather_mmu(&tlb, mm, 0, -1);
1127 if (type == CLEAR_REFS_SOFT_DIRTY) {
1128 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1129 if (!(vma->vm_flags & VM_SOFTDIRTY))
1130 continue;
1131 up_read(&mm->mmap_sem);
1132 if (down_write_killable(&mm->mmap_sem)) {
1133 count = -EINTR;
1134 goto out_mm;
1135 }
1136 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1137 vma->vm_flags &= ~VM_SOFTDIRTY;
1138 vma_set_page_prot(vma);
1139 }
1140 downgrade_write(&mm->mmap_sem);
1141 break;
1142 }
1143
1144 range.start = 0;
1145 range.end = -1UL;
1146 range.mm = mm;
1147 mmu_notifier_invalidate_range_start(&range);
1148 }
1149 walk_page_range(0, mm->highest_vm_end, &clear_refs_walk);
1150 if (type == CLEAR_REFS_SOFT_DIRTY)
1151 mmu_notifier_invalidate_range_end(&range);
1152 tlb_finish_mmu(&tlb, 0, -1);
1153 up_read(&mm->mmap_sem);
1154 out_mm:
1155 mmput(mm);
1156 }
1157 put_task_struct(task);
1158
1159 return count;
1160 }
1161
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25413 bytes --]
next prev parent reply other threads:[~2018-12-06 20:31 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 20:18 [PATCH 0/3] mmu notifier contextual informations jglisse
2018-12-03 20:18 ` jglisse
2018-12-03 20:18 ` [PATCH 1/3] mm/mmu_notifier: use structure for invalidate_range_start/end callback jglisse
2018-12-03 20:18 ` [PATCH 2/3] mm/mmu_notifier: use structure for invalidate_range_start/end calls jglisse
2018-12-03 20:18 ` jglisse
2018-12-04 0:09 ` Jerome Glisse
2018-12-04 0:09 ` Jerome Glisse
2018-12-05 11:04 ` Jan Kara
2018-12-05 11:04 ` Jan Kara
2018-12-05 11:04 ` Jan Kara
2018-12-05 15:53 ` Jerome Glisse
2018-12-05 15:53 ` Jerome Glisse
2018-12-05 16:28 ` Jan Kara
2018-12-05 16:28 ` Jan Kara
2018-12-05 16:28 ` Jan Kara
2018-12-06 20:31 ` kbuild test robot [this message]
2018-12-06 20:31 ` kbuild test robot
2018-12-06 20:31 ` kbuild test robot
2018-12-06 20:31 ` kbuild test robot
2018-12-06 20:31 ` kbuild test robot
2018-12-06 20:35 ` kbuild test robot
2018-12-06 20:35 ` kbuild test robot
2018-12-06 20:35 ` kbuild test robot
2018-12-06 20:35 ` kbuild test robot
2018-12-03 20:18 ` [PATCH 3/3] mm/mmu_notifier: contextual information for event triggering invalidation jglisse
2018-12-04 8:17 ` Mike Rapoport
2018-12-04 14:48 ` Jerome Glisse
2018-12-04 14:48 ` Jerome Glisse
2018-12-04 23:21 ` Andrew Morton
2018-12-06 20:53 ` kbuild test robot
2018-12-06 20:53 ` kbuild test robot
2018-12-06 20:53 ` kbuild test robot
2018-12-06 20:53 ` kbuild test robot
2018-12-06 20:53 ` kbuild test robot
2018-12-06 21:19 ` kbuild test robot
2018-12-06 21:19 ` kbuild test robot
2018-12-06 21:19 ` kbuild test robot
2018-12-06 21:19 ` kbuild test robot
2018-12-06 21:19 ` kbuild test robot
2018-12-06 21:51 ` Jerome Glisse
2018-12-06 21:51 ` Jerome Glisse
2018-12-06 21:51 ` Jerome Glisse
2018-12-06 21:51 ` Jerome Glisse
2018-12-04 7:35 ` [PATCH 0/3] mmu notifier contextual informations Koenig, Christian
2018-12-04 7:35 ` Koenig, Christian
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=201812070424.joqmufq2%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=dan.j.williams@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=jack@suse.cz \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=kbuild-all@01.org \
--cc=kvm@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mawilcox@microsoft.com \
--cc=mhocko@kernel.org \
--cc=pbonzini@redhat.com \
--cc=rcampbell@nvidia.com \
--cc=rkrcmar@redhat.com \
--cc=zwisler@kernel.org \
/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 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.