lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51EF4196.8050303@cn.fujitsu.com>
Date:	Wed, 24 Jul 2013 10:53:10 +0800
From:	Tang Chen <tangchen@...fujitsu.com>
To:	Tejun Heo <tj@...nel.org>
CC:	tglx@...utronix.de, mingo@...e.hu, hpa@...or.com,
	akpm@...ux-foundation.org, trenn@...e.de, yinghai@...nel.org,
	jiang.liu@...wei.com, wency@...fujitsu.com, laijs@...fujitsu.com,
	isimatu.yasuaki@...fujitsu.com, izumi.taku@...fujitsu.com,
	mgorman@...e.de, minchan@...nel.org, mina86@...a86.com,
	gong.chen@...ux.intel.com, vasilis.liaskovitis@...fitbricks.com,
	lwoodman@...hat.com, riel@...hat.com, jweiner@...hat.com,
	prarit@...hat.com, zhangyanfei@...fujitsu.com,
	yanghy@...fujitsu.com, x86@...nel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	linux-acpi@...r.kernel.org
Subject: Re: [PATCH 02/21] memblock, numa: Introduce flag into memblock.

On 07/24/2013 03:09 AM, Tejun Heo wrote:
> Hello,
>
> On Fri, Jul 19, 2013 at 03:59:15PM +0800, Tang Chen wrote:
>> +#define MEMBLK_FLAGS_DEFAULT	0x0	/* default flag */
>
> Please don't do this.  Just clearing the struct as zero is enough.
>
>> @@ -439,12 +449,14 @@ repeat:
>>   int __init_memblock memblock_add_node(phys_addr_t base, phys_addr_t size,
>>   				       int nid)
>>   {
>> -	return memblock_add_region(&memblock.memory, base, size, nid);
>> +	return memblock_add_region(&memblock.memory, base, size,
>> +				   nid, MEMBLK_FLAGS_DEFAULT);
>
> And just use zero for no flag.  Doing something like the above gets
> weird with actual flags.  e.g. if you add a flag, say, MEMBLK_HOTPLUG,
> should it be MEMBLK_FLAGS_DEFAULT | MEMBLK_HOTPLUG or just
> MEMBLK_HOTPLUG?  If latter, the knowledge that DEFAULT is zero is
> implicit, and, if so, why do it at all?

OK, will remove MEMBLK_FLAGS_DEFAULT, and use 0 by default.

>
>> +static int __init_memblock memblock_reserve_region(phys_addr_t base,
>> +						   phys_addr_t size,
>> +						   int nid,
>> +						   unsigned long flags)
>>   {
>>   	struct memblock_type *_rgn =&memblock.reserved;
>>
>> -	memblock_dbg("memblock_reserve: [%#016llx-%#016llx] %pF\n",
>> +	memblock_dbg("memblock_reserve: [%#016llx-%#016llx] with flags %#016lx %pF\n",
>
> Let's please drop "with" and do we really need to print full 16
> digits?

Sure, will remove "with". But I think printing out the full flags is batter.
The output seems more tidy.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ