linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: wency@cn.fujitsu.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, rientjes@google.com,
	liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org,
	paulus@samba.org, minchan.kim@gmail.com,
	akpm@linux-foundation.org
Subject: Re: [PATCH 2/4] memory-hotplug: add node_device_release
Date: Mon, 1 Oct 2012 15:54:40 +0900	[thread overview]
Message-ID: <50693E30.3010006@jp.fujitsu.com> (raw)
In-Reply-To: <CAHGf_=o_FLsEULK3s1+zD-A0FL5QvKnX542Lz4vCwVVV2fYNRw@mail.gmail.com>

Hi Kosaki-san,

2012/09/29 7:19, KOSAKI Motohiro wrote:
>>>> I don't understand it. How can we get rid of the warning?
>>>
>>> See cpu_device_release() for example.
>>
>> If we implement a function like cpu_device_release(), the warning
>> disappears. But the comment says in the function "Never copy this way...".
>> So I think it is illegal way.
>
> What does "illegal" mean?

The "illegal" means the code should not be mimicked.

> You still haven't explain any benefit of your code. If there is zero
> benefit, just kill it.
> I believe everybody think so.
>
> Again, Which benefit do you have?

The patch has a benefit to delets a warning message.

>
>>>>> Why do we need this node_device_release() implementation?
>>>>
>>>> I think that this is a manner of releasing object related kobject.
>>>
>>> No.  Usually we never call memset() from release callback.
>>
>> What we want to release is a part of array, not a pointer.
>> Therefore, there is only this way instead of kfree().
>
> Why? Before your patch, we don't have memset() and did work it.

If we does not apply the patch, a warning message is shown.
So I think it did not work well.

> I can't understand what mean "only way".

For deleting a warning message, I created a node_device_release().
In the manner of releasing kobject, the function frees a object related
to the kobject. So most functions calls kfree() for releasing it.
In node_device_release(), we need to free a node struct. If the node
struct is pointer, I can free it by kfree. But the node struct is a part
of node_devices[] array. I cannot free it. So I filled the node struct
with 0.

But you think it is not good. Do you have a good solution?

Thanks,
Yasuaki Ishimatsu

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


--
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>

  reply	other threads:[~2012-10-01  6:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27  5:45 [PATCH 0/4] bugfix for memory hotplug wency
2012-09-27  5:45 ` [PATCH 1/4] memory-hotplug: add memory_block_release wency
2012-09-27 10:20   ` Ni zhan Chen
2012-09-28  0:24     ` Yasuaki Ishimatsu
2012-09-28  1:35       ` KOSAKI Motohiro
2012-09-28  3:45         ` Yasuaki Ishimatsu
2012-09-28  6:04           ` Ni zhan Chen
2012-09-28  6:11             ` Yasuaki Ishimatsu
2012-09-28  6:14           ` Ni zhan Chen
2012-09-28 22:30           ` KOSAKI Motohiro
2012-09-27 20:11   ` KOSAKI Motohiro
2012-09-27  5:45 ` [PATCH 2/4] memory-hotplug: add node_device_release wency
2012-09-27 10:38   ` Ni zhan Chen
2012-09-27 20:13   ` KOSAKI Motohiro
2012-09-28  0:07     ` Yasuaki Ishimatsu
2012-09-28  1:13       ` KOSAKI Motohiro
2012-09-28  1:30         ` Yasuaki Ishimatsu
2012-09-28  1:37           ` KOSAKI Motohiro
2012-09-28  9:55             ` Yasuaki Ishimatsu
2012-09-28 22:19               ` KOSAKI Motohiro
2012-10-01  6:54                 ` Yasuaki Ishimatsu [this message]
2012-10-01 18:12                   ` KOSAKI Motohiro
2012-10-05  1:00                     ` Yasuaki Ishimatsu
2012-10-05 18:39                       ` KOSAKI Motohiro
2012-09-27  5:45 ` [PATCH 3/4] memory-hotplug: clear hwpoisoned flag when onlining pages wency
2012-09-27 12:27   ` Ni zhan Chen
2012-09-27 20:17   ` KOSAKI Motohiro
2012-09-28  1:53     ` Wen Congyang
2012-09-27  5:45 ` [PATCH 4/4] memory-hotplug: auto offline page_cgroup when onlining memory block failed wency
2012-09-27 12:44   ` Ni zhan Chen
2012-09-27 20:19   ` KOSAKI Motohiro
2012-09-27 21:18 ` [PATCH 0/4] bugfix for memory hotplug Andrew Morton
2012-09-29  2:31 ` Ni zhan Chen

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=50693E30.3010006@jp.fujitsu.com \
    --to=isimatu.yasuaki@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuj97@gmail.com \
    --cc=minchan.kim@gmail.com \
    --cc=paulus@samba.org \
    --cc=rientjes@google.com \
    --cc=wency@cn.fujitsu.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox