Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp4039195ybd; Tue, 25 Jun 2019 12:57:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlaO89F/sauk6HErrXu+myRyqjr3Azu9nwH8WTNmC+bX76NZBEvw8QXr1mp9o2xhE/G16Q X-Received: by 2002:a63:dc50:: with SMTP id f16mr41207285pgj.447.1561492638349; Tue, 25 Jun 2019 12:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561492638; cv=none; d=google.com; s=arc-20160816; b=SKJNUyFtfkt7yDLlmh5cV7CAnuQMGA1GqfrPP90kNt73zQ+5u2l8lA+4z++/r4gvEz 1b6UaizYR8rJJA5OqUkTKgu0XeD0yRF4qKrjjLFC7VC6jlszg0Kuzw1be4lHA0ynZgJ2 kzGoWtP2O16aL+9S3lbZeEsavgj8qQk7toFlUrmG4YimB2lPNgd4dDfLzFHmi42qiBpO Q9j70e5UBdwpL9ETVOkyeh+4Upymn6kZ5JDX9ykBmbQKpf2iqP6b5VfhumDam24lswCQ qR0pmjzYaHPzO9fDKROW/r92vnhAH84W/w2bbZwAoTALnVPCwBNMpQpRyVJ8iffVTDz0 M9ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3tJadmfIaP+3cUt4e6djg3uYwSGFYlA4L4PJ/03vX94=; b=YCyaOCxWAuiDnhwkOtaFOjEo3q9AIjUaLQiNParicoB8dzgiCM/DCSV6bBpRPvhQij 7j8rKMJroBSvSIRFQaADgDzgyddf82QKNEtTNPDFf1e3Q2sVka+5AWb5YyG83JEz8GX3 3SNIpmkXp4jgP6lP6AfWLAoYfuo53NY+Dt3WPjoxq5KA9K++W3KhNY53+w/3XtDrcUlL /Fw4/B4OaxPDKEid7G+arRxslRGM45YDCMp50xN81S0kE/DNHkQYiD2Cv9OhahtR22eJ pG1lZ2zSRSMWfon517wgDHcNUr0GrG3j0o3l5V8qgrrCYGStVWAUCNWMlUveHP8Ziqwt 1epA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EH3y4zD2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y21si1025884plp.332.2019.06.25.12.57.02; Tue, 25 Jun 2019 12:57:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EH3y4zD2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731747AbfFYSbQ (ORCPT + 99 others); Tue, 25 Jun 2019 14:31:16 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:39237 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbfFYSbQ (ORCPT ); Tue, 25 Jun 2019 14:31:16 -0400 Received: by mail-yb1-f196.google.com with SMTP id k4so999563ybo.6 for ; Tue, 25 Jun 2019 11:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3tJadmfIaP+3cUt4e6djg3uYwSGFYlA4L4PJ/03vX94=; b=EH3y4zD22YVqGG+RHMfFEthpglof2dKKJrLZODUIcgdQyL6wvrwdMmPysZQFNoc2BK 03B4jdpd9RdUOnaQHMk/k7zYWHUxDFiMN85zh3eBas/KoFrA9RJ4Oh4Pay55XRPXrnUI kRlCCKZ1Q4xVqcRZg8cDczj/dp10i2E+bDt59cYKTPiX6rijpqiPa6Ng7hdxL8GVQzUO zK9o82cg7pIIab6+dGP9KB9qKEPh3aSRQEHXkMhIV0F1KB7EmBXM4kjp3LTaDvVnAmAq kYmt9k9R+v75ZAK5NW6TNMmnsYyEtKQ58mOIhfE0GXIPY85W1HBMHmw6ubXTAGPWdpdB i4lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3tJadmfIaP+3cUt4e6djg3uYwSGFYlA4L4PJ/03vX94=; b=b9lQzp2CWtglPvypY6T8tUMIV2QMQIhpHR9ZAp9Fq+pXG/65zqbyr0+VuRwi4gdxV5 i3EFVQou/ZF/f2f8+us09X1a05r2PunNQ1ADGgO3L4CLP4b6a1kOibNH0K98uh81gRQB stwpCiUuFzC9uJWP6dZRtWKlu/esQG7nf3+bzx7xJe/+eeEOzwgnCF2TU1/ZvvnR9IE0 l0loN7yFc9q6q/gaAiSmzLdPLkJfwcNhQZMD51GXA0YgEis/4bS9PrRw7D8Pc2Nw4AYw hzNduvERLfidJx7herbpvDtIz/2GYbNBm5nZuhA0TnkiUbrMf8a8M3XrqbneNLIa7GKu I4Fg== X-Gm-Message-State: APjAAAUtFQTpk0QJM9XLCU1ICBjZ21NXwVOF3rBUK5y7qT8oX6iEPB0f 6V7OohH8jlf/o8bDZijx0aq7p0m50xKwlLRnyeIEgQ== X-Received: by 2002:a25:943:: with SMTP id u3mr82067600ybm.293.1561487475490; Tue, 25 Jun 2019 11:31:15 -0700 (PDT) MIME-Version: 1.0 References: <20190611231813.3148843-1-guro@fb.com> <20190611231813.3148843-7-guro@fb.com> In-Reply-To: <20190611231813.3148843-7-guro@fb.com> From: Shakeel Butt Date: Tue, 25 Jun 2019 11:31:04 -0700 Message-ID: Subject: Re: [PATCH v7 06/10] mm: don't check the dying flag on kmem_cache creation To: Roman Gushchin Cc: Andrew Morton , Vladimir Davydov , Linux MM , LKML , Kernel Team , Johannes Weiner , Waiman Long Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 11, 2019 at 4:18 PM Roman Gushchin wrote: > > There is no point in checking the root_cache->memcg_params.dying > flag on kmem_cache creation path. New allocations shouldn't be > performed using a dead root kmem_cache, Yes, it's the user's responsibility to synchronize the kmem cache destruction and allocations. > so no new memcg kmem_cache > creation can be scheduled after the flag is set. And if it was > scheduled before, flush_memcg_workqueue() will wait for it anyway. > > So let's drop this check to simplify the code. > > Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt