|
From: | Hyman Huang |
Subject: | Re: [PATCH v14 7/7] softmmu/dirtylimit: Implement dirty page rate limit |
Date: | Mon, 14 Feb 2022 17:24:57 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 |
在 2022/2/14 16:25, Peter Xu 写道:
On Fri, Feb 11, 2022 at 12:17:41AM +0800, huangy81@chinatelecom.cn wrote:+static struct DirtyLimitInfoList *dirtylimit_query_all(void) +{ + int i, index; + DirtyLimitInfo *info = NULL; + DirtyLimitInfoList *head = NULL, **tail = &head; + + dirtylimit_state_lock(); + + if (!dirtylimit_in_service()) {Need to unlock?
Yes, i'll fix it next version.
+ return NULL; + } + + for (i = 0; i < dirtylimit_state->max_cpus; i++) { + index = dirtylimit_state->states[i].cpu_index; + if (dirtylimit_vcpu_get_state(index)->enabled) { + info = dirtylimit_query_vcpu(index); + QAPI_LIST_APPEND(tail, info); + } + } + + dirtylimit_state_unlock(); + + return head; +}
-- Best regard Hyman Huang(黄勇)
[Prev in Thread] | Current Thread | [Next in Thread] |