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: <050a01d230f2$826f0b20$874d2160$@alibaba-inc.com>
Date:   Fri, 28 Oct 2016 16:08:46 +0800
From:   "Hillf Danton" <hillf.zj@...baba-inc.com>
To:     "'Huang, Ying'" <ying.huang@...el.com>,
        "'Andrew Morton'" <akpm@...ux-foundation.org>
Cc:     <tim.c.chen@...el.com>, <dave.hansen@...el.com>,
        <andi.kleen@...el.com>, <aaron.lu@...el.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>,
        "'Hugh Dickins'" <hughd@...gle.com>,
        "'Shaohua Li'" <shli@...nel.org>,
        "'Minchan Kim'" <minchan@...nel.org>,
        "'Rik van Riel'" <riel@...hat.com>,
        "'Andrea Arcangeli'" <aarcange@...hat.com>,
        "'Kirill A . Shutemov'" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH -v4 RESEND 6/9] mm, THP, swap: Support to add/delete THP to/from swap cache

On Friday, October 28, 2016 1:56 PM Huang, Ying wrote:
> 
> @@ -109,9 +118,16 @@ int __add_to_swap_cache(struct page *page, swp_entry_t entry)
>  		 * So add_to_swap_cache() doesn't returns -EEXIST.
>  		 */
>  		VM_BUG_ON(error == -EEXIST);
> -		set_page_private(page, 0UL);
>  		ClearPageSwapCache(page);
> -		put_page(page);
> +		set_page_private(cur_page, 0UL);
> +		while (i--) {
> +			cur_page--;
> +			cur_entry.val--;
> +			set_page_private(cur_page, 0UL);
> +			radix_tree_delete(&address_space->page_tree,
> +					  swp_offset(cur_entry));
> +		}

Pull pages out of radix tree with tree lock held?

> +		page_ref_sub(page, nr);
>  	}
> 
>  	return error;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ