linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Wang Xiaoqiang" <wang_xiaoq@126.com>
To: vbabka@suse.cz, n-horiguchi@ah.jp.nec.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Question About Functions "__free_pages_check" and "check_new_page" in page_alloc.c
Date: Mon, 16 May 2016 21:42:23 +0800 (CST)	[thread overview]
Message-ID: <7374bd2e.da35.154b9cda7d2.Coremail.wang_xiaoq@126.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

Hi all,

    I am really confused about these two functions. The following code snippet:

if(unlikely(atomic_read(&page->_mapcount) != -1))
		bad_reason ="nonzero mapcount";if(unlikely(page->mapping != NULL))
		bad_reason ="non-NULL mapping";if(unlikely(page_ref_count(page) !=0))
		bad_reason ="nonzero _count";
        ...
Wouldn't the previous value of "bad_reason" be overwritten by 
the later? Hope to receive from you.

--

thx!
Wang Xiaoqiang

[-- Attachment #2: Type: text/html, Size: 1855 bytes --]

             reply	other threads:[~2016-05-16 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 13:42 Wang Xiaoqiang [this message]
2016-05-16 15:16 ` Michal Hocko
2016-05-17  1:06   ` Wang Xiaoqiang
2016-05-17  5:14     ` Vlastimil Babka
2016-05-17  8:17       ` Wang Xiaoqiang

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=7374bd2e.da35.154b9cda7d2.Coremail.wang_xiaoq@126.com \
    --to=wang_xiaoq@126.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=vbabka@suse.cz \
    /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