From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0E8CC07E9D for ; Thu, 29 Sep 2022 09:04:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69DC08D0001; Thu, 29 Sep 2022 05:04:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 64DC96B0073; Thu, 29 Sep 2022 05:04:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 515438D0001; Thu, 29 Sep 2022 05:04:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3FB4C6B0072 for ; Thu, 29 Sep 2022 05:04:32 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 261AD121287 for ; Thu, 29 Sep 2022 09:04:32 +0000 (UTC) X-FDA: 79964537184.26.386CD0A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf04.hostedemail.com (Postfix) with ESMTP id A808F40011 for ; Thu, 29 Sep 2022 09:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664442271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZaVCDSxgfFbbhpN7t2ZlL2MHraJNJaYgGTscSpeG8bI=; b=US4nReiV1pPxXhkJ58Cyl9ogbWYhGeHqHGDHYJS8XueIdDgSpTqYgTqXgA+dH6Xpz4cPM4 r/N+PoL6z7mfaaQFysO6ue4oXlXBuvdf4tdxnrEa+OflRcWQoyGfkVnXWtR0Hogt9dEuA3 OJeIARdmlc81trDJcCI5dXkOY7PlRCs= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-624-o64LAcJ9NuKxxJI_ISgviA-1; Thu, 29 Sep 2022 05:04:29 -0400 X-MC-Unique: o64LAcJ9NuKxxJI_ISgviA-1 Received: by mail-wm1-f72.google.com with SMTP id b5-20020a05600c4e0500b003b499f99aceso2682613wmq.1 for ; Thu, 29 Sep 2022 02:04:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=ZaVCDSxgfFbbhpN7t2ZlL2MHraJNJaYgGTscSpeG8bI=; b=NCl7kpqlbnsvQDGk2M0oUGJSESxBCSsBH+2hT1lvSmrm0I31Q3lXGXxVyju2tyZJFo BPuUML1d1K/FSBF0Z/h66a+GkdRPro4XHfaLFX6Z6ghx81kk7mMze2yAGEKoIOIc3WqP 68uIYbcAxa5JgzV7u/QWdRFHC5tBMiHE8v3aEGqhFGfU47qXUrvOjn9ydmqxSys8eHHV N4dmg2T0HbsYyzUkqGLI2IP4/GFZ6/T25TmnDjFRCOSQFsXZBrv2QGRF7GCxjqtytMy7 hCVuCf1ck24A+kj19Xwf/ICj/9neKHJJEOo/GquyOMGC+UsKnzD7sA5mkEj3f11gfrCr 6OYw== X-Gm-Message-State: ACrzQf13fSDpyHtLASANfuGI/IncQAId/8aIeFE9Yh+Pd6C53hAY9Hoa Bg1RNbpEgsMgTN+ojYpBCsOJ+QPgYpn+CL0A3L034OgqAQmdlqpijvY/xyq2Rm7fR01J3h73Yf4 RGawchzko2IM= X-Received: by 2002:a5d:64c7:0:b0:22a:6a2e:c4f1 with SMTP id f7-20020a5d64c7000000b0022a6a2ec4f1mr1355209wri.269.1664442268808; Thu, 29 Sep 2022 02:04:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7j7YGY9YexIU4PweeHwyH1XB9hyrfcXMb0si62fL6a+YKhLNI6oZjfmmbQ55PFKBuyPXRTBw== X-Received: by 2002:a5d:64c7:0:b0:22a:6a2e:c4f1 with SMTP id f7-20020a5d64c7000000b0022a6a2ec4f1mr1355187wri.269.1664442268525; Thu, 29 Sep 2022 02:04:28 -0700 (PDT) Received: from ?IPV6:2003:cb:c705:ce00:b5d:2b28:1eb5:9245? (p200300cbc705ce000b5d2b281eb59245.dip0.t-ipconnect.de. [2003:cb:c705:ce00:b5d:2b28:1eb5:9245]) by smtp.gmail.com with ESMTPSA id s2-20020a5d4ec2000000b00228d67db06esm6063780wrv.21.2022.09.29.02.04.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Sep 2022 02:04:28 -0700 (PDT) Message-ID: <975cd79d-b211-c10b-4e25-d7b7203c0109@redhat.com> Date: Thu, 29 Sep 2022 11:04:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH -next v4 1/3] selftests/memory-hotplug: Add checking after online or offline To: zhaogongyi , "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" References: From: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=US4nReiV; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664442271; a=rsa-sha256; cv=none; b=ZGZohpPC2yLR4YSZlJcMVX/rizALKVeQBbsmfOCyO2/FFN6fTIIo1Z5R5mFPPJ0FmylyFr ovkTz+/w3KjH5T1jx3hYJMgSJC3G1PthmFpCDqNZ7SJF/xG1ECDQwcc03rTiE65qDQMQe/ Wbo2vc+2vB83tJ5MowUI9eB4KSHWW9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664442271; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZaVCDSxgfFbbhpN7t2ZlL2MHraJNJaYgGTscSpeG8bI=; b=8mx5PLQphlSKrOQVYoSp5vHlXARSN0s9Zs3Z8J+r48pJj8jbiqopvHXSlrH0xp7oAJJKFx 0cVceRa8+LqzXSk3A93D2EhQCK30kqze3rNdm9mf/djC6uwxL5s7adhHcw21Gv3DC0+a48 Z8Gww1UnxiujJKrPboIr2+YkmxfD6f8= X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=US4nReiV; spf=pass (imf04.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam10 X-Stat-Signature: 8ru95nbbo1sm6cd8pyeqtmr4uo5pkrmc X-Rspamd-Queue-Id: A808F40011 X-HE-Tag: 1664442271-481424 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 29.09.22 09:39, zhaogongyi wrote: > Hi, > > We can not get the EBUSY from " echo 0 > /sys/devices/system/memory/memoryxxx/online", maybe, redirect the error ouput to /dev/null is suitable when calling offline_memory_expect_success(): > > # sh mem-on-off-test.sh -a > mem-on-off-test.sh: illegal option -- a > Test scope: 2% hotplug memory > online all hot-pluggable memory in offline state: > SKIPPED - no hot-pluggable memory in offline state > offline 2% hot-pluggable memory in online state > trying to offline 4 out of 192 memory block(s): > online->offline memory0 > online->offline memory10 > online->offline memory100 > online->offline memory101 > online->offline memory102 > online->offline memory103 > online->offline memory104 > online->offline memory105 > online->offline memory106 > online->offline memory107 > online->offline memory108 > online->offline memory109 > online->offline memory11 > online->offline memory110 > online->offline memory111 > online->offline memory112 > online->offline memory113 > online->offline memory114 > online->offline memory115 > online->offline memory116 > online->offline memory117 > online->offline memory118 > online->offline memory119 > online->offline memory12 > online->offline memory120 > online->offline memory121 > online->offline memory122 > online->offline memory123 > online->offline memory124 Can we have here an output like online->offline memory0 -> Failure online->offline memory10 -> Success That would make much more sense for debugging purposes and understanding what is happening here. I was primarily concerned about the misleading error message, that indicated that something is "unexpected" -- it's perfectly reasonable here to *expect* that offlining a random memory blocks just fails. -- Thanks, David / dhildenb