[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <746adf31-e70c-e32d-a35d-72d352af613b@intel.com>
Date: Fri, 2 Dec 2022 13:45:20 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Kristen Carlson Accardi <kristen@...ux.intel.com>,
jarkko@...nel.org, dave.hansen@...ux.intel.com, tj@...nel.org,
linux-kernel@...r.kernel.org, linux-sgx@...r.kernel.org,
cgroups@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Cc: zhiquan1.li@...el.com, Sean Christopherson <seanjc@...gle.com>
Subject: Re: [PATCH v2 01/18] x86/sgx: Call cond_resched() at the end of
sgx_reclaim_pages()
On 12/2/22 13:37, Kristen Carlson Accardi wrote:
>>> +static void sgx_reclaim_pages(void)
>>> +{
>>> + __sgx_reclaim_pages();
>>> + cond_resched();
>>> +}
>> Why bother with the wrapper? Can't we just put cond_resched() in the
>> existing sgx_reclaim_pages()?
> Because sgx_reclaim_direct() needs to call sgx_reclaim_pages() but not
> do the cond_resched(). It was this or add a boolean or something to let
> caller's opt out of the resched.
Is there a reason sgx_reclaim_direct() *can't* or shouldn't call
cond_resched()?
Powered by blists - more mailing lists