xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bob Liu <lliubbo@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: james.harper@bendigoit.com.au, keir@xen.org,
	ian.campbell@citrix.com, andrew.cooper3@citrix.com,
	JBeulich@suse.com
Subject: [PATCH 08/14] tmem: drop oneline function client_freeze()
Date: Wed, 18 Dec 2013 14:52:35 +0800	[thread overview]
Message-ID: <1387349561-27923-9-git-send-email-bob.liu@oracle.com> (raw)
In-Reply-To: <1387349561-27923-1-git-send-email-bob.liu@oracle.com>

Function client_freeze() only set client->frozen = freeze, the caller can do
this work directly.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
 xen/common/tmem.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 91096eb..70c80ab 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1236,11 +1236,6 @@ static bool_t client_over_quota(struct client *client)
              ((total*100L) / client->weight) );
 }
 
-static void client_freeze(struct client *client, int freeze)
-{
-    client->frozen = freeze;
-}
-
 /************ MEMORY REVOCATION ROUTINES *******************************/
 
 static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *hold_pool_rwlock)
@@ -1988,14 +1983,14 @@ static int tmemc_freeze_pools(domid_t cli_id, int arg)
     if ( cli_id == TMEM_CLI_ID_NULL )
     {
         list_for_each_entry(client,&global_client_list,client_list)
-            client_freeze(client,freeze);
+            client->frozen = freeze;
         tmem_client_info("tmem: all pools %s for all %ss\n", s, tmem_client_str);
     }
     else
     {
         if ( (client = tmem_client_from_cli_id(cli_id)) == NULL)
             return -1;
-        client_freeze(client,freeze);
+        client->frozen = freeze;
         tmem_client_info("tmem: all pools %s for %s=%d\n",
                          s, tmem_cli_id_str, cli_id);
     }
-- 
1.7.10.4

  parent reply	other threads:[~2013-12-18  6:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  6:52 [PATCH 00/14] xen: new patches for tmem cleanup Bob Liu
2013-12-18  6:52 ` [PATCH 01/14] tmem: cleanup: drop pageshift from struct tmem_pool Bob Liu
2013-12-18  6:52 ` [PATCH 02/14] tmem: refactor function do_tmem_op() Bob Liu
2013-12-18  6:52 ` [PATCH 03/14] tmem: cleanup: drop unneeded client/pool initialization Bob Liu
2013-12-18  6:52 ` [PATCH 04/14] tmem: bugfix in obj allocate path Bob Liu
2013-12-18  6:52 ` [PATCH 05/14] tmem: cleanup: remove unneed parameter for pgp_delist() Bob Liu
2013-12-18  6:52 ` [PATCH 06/14] tmem: cleanup: remove unneed parameter for pgp_free() Bob Liu
2013-12-18  6:52 ` [PATCH 07/14] tmem: cleanup the pgp free path Bob Liu
2013-12-18  6:52 ` Bob Liu [this message]
2013-12-18  6:52 ` [PATCH 09/14] tmem: remove unneeded parameters for obj destroy Bob Liu
2013-12-18  6:52 ` [PATCH 10/14] tmem: cleanup: drop global_pool_list Bob Liu
2013-12-18  6:52 ` [PATCH 11/14] tmem: fix the return value of tmemc_set_var() Bob Liu
2013-12-18  6:52 ` [PATCH 12/14] tmem: cleanup: refactor function tmemc_shared_pool_auth() Bob Liu
2013-12-18  6:52 ` [PATCH 13/14] tmem: reorg the shared pool allocate path Bob Liu
2013-12-18  6:52 ` [PATCH 14/14] tmem: remove useless parameter from client and pool flush Bob Liu
  -- strict thread matches above, loose matches on Subject: below --
2014-01-28  4:28 [PATCH RESEND 00/14] xen: new patches for tmem Bob Liu
2014-01-28  4:28 ` [PATCH 08/14] tmem: drop oneline function client_freeze() Bob Liu

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=1387349561-27923-9-git-send-email-bob.liu@oracle.com \
    --to=lliubbo@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=james.harper@bendigoit.com.au \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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;
as well as URLs for NNTP newsgroup(s).