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: <ZO1sBjE+1n3FQLbX@casper.infradead.org>
Date:   Tue, 29 Aug 2023 04:54:46 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Kemeng Shi <shikemeng@...weicloud.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        akpm@...ux-foundation.org, baolin.wang@...ux.alibaba.com,
        mgorman@...hsingularity.net, david@...hat.com
Subject: Re: [PATCH v2 7/7] mm/compaction: factor out code to test if we
 should run compaction for target order

On Sat, Aug 26, 2023 at 11:36:17PM +0800, Kemeng Shi wrote:
> +		if (compaction_suit_allocation_order(zone,
> +				pgdat->kcompactd_max_order,
> +				highest_zoneidx, ALLOC_WMARK_MIN) ==
> +				COMPACT_CONTINUE)

The indentation is confusing here.  It looks like COMPACT_CONTINUE is
an argument of compaction_suit_allocation_order().  How about:

		ret = compaction_suit_allocation_order(zone,
				pgdat->kcompactd_max_order,
				highest_zoneidx, ALLOC_WMARK_MIN);
		if (ret == COMPACT_CONTINUE)

(assuming there's a handy variable called ret)

You could also distinguih it by indenting COMPACT_CONTINUE by an
extra tab, but I think it's worth an extra variable just because this is
such a long line.

> +		if (compaction_suit_allocation_order(zone,
> +				cc.order, zoneid, ALLOC_WMARK_MIN) !=
> +				COMPACT_CONTINUE)
>  			continue;

Same here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ