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]
Date:	Tue, 4 Nov 2008 15:20:56 -0600 (CST)
From:	Christoph Lameter <cl@...ux-foundation.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	David Rientjes <rientjes@...gle.com>, npiggin@...e.de,
	peterz@...radead.org, menage@...gle.com, dfults@....com,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 1/7] cpusets: add dirty map to struct address_space

On Tue, 4 Nov 2008, Andrew Morton wrote:

>> +#ifdef CONFIG_CPUSETS
>> +#if MAX_NUMNODES <= BITS_PER_LONG
>> +	nodemask_t		dirty_nodes;	/* nodes with dirty pages */
>> +#else
>> +	nodemask_t		*dirty_nodes;	/* pointer to mask, if dirty */
>> +#endif
>> +#endif
>>  } __attribute__((aligned(sizeof(long))));
>
> eek.  Increasing the size of the address_space (and hence of the inode)
> is a moderately big deal - there can be millions of these in memory.

Well this is adding only a single word to the inode structure.

>> @@ -72,6 +72,8 @@ struct writeback_control {
>>  	 * so we use a single control to update them
>>  	 */
>>  	unsigned no_nrwrite_index_update:1;
>> +
>> +	nodemask_t *nodes;		/* Nodemask to writeback */
>
> This one doesn't get ifdefs?

The structure is typically allocated temporarily on the stack.

>> +	nodemask_t *nodes = mapping->dirty_nodes;
>> +	int node = page_to_nid(page);
>> +
>> +	if (!nodes) {
>> +		nodes = kmalloc(sizeof(nodemask_t), GFP_ATOMIC);
>
> erk, OK, called from __set_page_dirty, needs to be atomic.
>
> What are the consequences when this allocation fails?

Dirty tracking will not occur. All nodes are assumed to be dirty.

We discussed this earlier 
http://www.ussg.iu.edu/hypermail/linux/kernel/0709.1/2291.html

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