linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH -next v5 2/4] selftests/memory-hotplug: Restore memory before exit
@ 2022-10-11  1:48 zhaogongyi
  0 siblings, 0 replies; 8+ messages in thread
From: zhaogongyi @ 2022-10-11  1:48 UTC (permalink / raw)
  To: Shuah Khan, David Hildenbrand, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org
  Cc: akinobu.mita@gmail.com, corbet@lwn.net, osalvador@suse.de,
	shuah@kernel.org

Hi Shuah, David,

I am sorry for my slow response, I have submit a new patch to fix it. Please see: https://patchwork.kernel.org/project/linux-kselftest/patch/20221011013926.200774-1-zhaogongyi@huawei.com/

Thanks,
Gongyi

> 
> On 10/10/22 00:54, David Hildenbrand wrote:
> > On 08.10.22 03:40, zhaogongyi wrote:
> 
> >>
> >> Yes, online_memory_expect_success() already prints a warning,
> remove
> >> the warning in online_all_offline_memory() seems ok,
> >>
> >> My previous consideration was that one more log information would
> make it easier to locate the wrong location.
> >
> > Let's keep it simple unless there is real reason to warn twice.
> >
> 
> zhaogongyi,
> 
> Please note that I already applied the patches to linux-kselftest next for my
> second pull request before the merge window. Please send the change
> David requested in a separate patch on top of next as a fix.
> 
> thanks,
> -- Shuah

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH -next v5 2/4] selftests/memory-hotplug: Restore memory before exit
@ 2022-10-08  1:40 zhaogongyi
  2022-10-10  6:54 ` David Hildenbrand
  0 siblings, 1 reply; 8+ messages in thread
From: zhaogongyi @ 2022-10-08  1:40 UTC (permalink / raw)
  To: David Hildenbrand, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org
  Cc: akinobu.mita@gmail.com, corbet@lwn.net, osalvador@suse.de,
	shuah@kernel.org

Hi!

> 
> On 30.09.22 10:52, zhaogongyi wrote:
> > Hi!
> >
> >>
> >> On 30.09.22 08:35, Zhao Gongyi wrote:
> >>> Some momory will be left in offline state when calling
> >>> offline_memory_expect_fail() failed. Restore it before exit.
> >>>
> >>> Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
> >>> ---
> >>>    .../memory-hotplug/mem-on-off-test.sh         | 21
> >> ++++++++++++++-----
> >>>    1 file changed, 16 insertions(+), 5 deletions(-)
> >>>
> >>> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> >> b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> >>> index 1d87611a7d52..91a7457616bb 100755
> >>> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> >>> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> >>> @@ -134,6 +134,16 @@ offline_memory_expect_fail()
> >>>    	return 0
> >>>    }
> >>>
> >>> +online_all_offline_memory()
> >>> +{
> >>> +	for memory in `hotpluggable_offline_memory`; do
> >>> +		if ! online_memory_expect_success $memory; then
> >>> +			echo "$FUNCNAME $memory: unexpected fail" >&2
> >>
> >> Do we need that output?
> >
> > In my opinion, if online a memory node failed ,it should be a kernel bug
> catched, so, I think the output here is needed.
> 
> But online_memory_expect_success() already prints a warning, no?

Yes, online_memory_expect_success() already prints a warning, remove the warning in online_all_offline_memory() seems ok,

My previous consideration was that one more log information would make it easier to locate the wrong location.

Best Regards,
Gongyi

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH -next v5 2/4] selftests/memory-hotplug: Restore memory before exit
@ 2022-09-30  8:52 zhaogongyi
  2022-09-30  8:56 ` David Hildenbrand
  0 siblings, 1 reply; 8+ messages in thread
From: zhaogongyi @ 2022-09-30  8:52 UTC (permalink / raw)
  To: David Hildenbrand, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org
  Cc: akinobu.mita@gmail.com, corbet@lwn.net, osalvador@suse.de,
	shuah@kernel.org

Hi!

> 
> On 30.09.22 08:35, Zhao Gongyi wrote:
> > Some momory will be left in offline state when calling
> > offline_memory_expect_fail() failed. Restore it before exit.
> >
> > Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
> > ---
> >   .../memory-hotplug/mem-on-off-test.sh         | 21
> ++++++++++++++-----
> >   1 file changed, 16 insertions(+), 5 deletions(-)
> >
> > diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> > index 1d87611a7d52..91a7457616bb 100755
> > --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> > +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> > @@ -134,6 +134,16 @@ offline_memory_expect_fail()
> >   	return 0
> >   }
> >
> > +online_all_offline_memory()
> > +{
> > +	for memory in `hotpluggable_offline_memory`; do
> > +		if ! online_memory_expect_success $memory; then
> > +			echo "$FUNCNAME $memory: unexpected fail" >&2
> 
> Do we need that output?

In my opinion, if online a memory node failed ,it should be a kernel bug catched, so, I think the output here is needed.

Thanks!

Gongyi

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH -next v5 0/4] Optimize and bugfix for memory-hotplug
@ 2022-09-30  6:35 Zhao Gongyi
  2022-09-30  6:35 ` [PATCH -next v5 2/4] selftests/memory-hotplug: Restore memory before exit Zhao Gongyi
  0 siblings, 1 reply; 8+ messages in thread
From: Zhao Gongyi @ 2022-09-30  6:35 UTC (permalink / raw)
  To: linux-doc, linux-kernel, linux-mm, linux-kselftest
  Cc: akinobu.mita, corbet, david, osalvador, shuah, zhaogongyi

1. Add checking after online or offline
2. Restore memory before exit
3. Adjust log info for maintainability
4. Correct test's name

Changes in v5:
  - Adjust log info for maintainability

Changes in v4:
  - Remove redundant log information

Changes in v3:
  - Remove 2 obselute patches

Zhao Gongyi (4):
  selftests/memory-hotplug: Add checking after online or offline
  selftests/memory-hotplug: Restore memory before exit
  selftests/memory-hotplug: Adjust log info for maintainability
  docs: notifier-error-inject: Correct test's name

 .../fault-injection/notifier-error-inject.rst |  4 +--
 .../memory-hotplug/mem-on-off-test.sh         | 34 +++++++++++++++----
 2 files changed, 29 insertions(+), 9 deletions(-)

--
2.17.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-11  1:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-11  1:48 [PATCH -next v5 2/4] selftests/memory-hotplug: Restore memory before exit zhaogongyi
  -- strict thread matches above, loose matches on Subject: below --
2022-10-08  1:40 zhaogongyi
2022-10-10  6:54 ` David Hildenbrand
2022-10-10 17:02   ` Shuah Khan
2022-09-30  8:52 zhaogongyi
2022-09-30  8:56 ` David Hildenbrand
2022-09-30  6:35 [PATCH -next v5 0/4] Optimize and bugfix for memory-hotplug Zhao Gongyi
2022-09-30  6:35 ` [PATCH -next v5 2/4] selftests/memory-hotplug: Restore memory before exit Zhao Gongyi
2022-09-30  8:33   ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).