Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1636283ybi; Sun, 16 Jun 2019 09:28:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyHWhwVTXvxwQ81MppaY4QOiJARsGqqii8Lbif326gYEg0O1NCS/Xlnf2i269iUKhZpatH X-Received: by 2002:a17:90a:9905:: with SMTP id b5mr22271678pjp.70.1560702503862; Sun, 16 Jun 2019 09:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560702503; cv=none; d=google.com; s=arc-20160816; b=Ir3QKD4zLM26GcvxoxrYl1oY2NfwE8oWW8UacfYMxW58RqmdThO9qF/q0tKmKyKJez Ju2A70aDhF0pK0zGTx/MQDvHdc1bsUxJHm0mb1SYb9fgFCuEn3Eh9OKmQAyGzBnnQ7Hk HghwnBwxjqImG5XaSj8NsaAJUKSp88ub0aX9ZfxhDB0j42WQ0lBraOdyL13dkWOuVnGJ o3mUYSxaRYI/9Ve7FJQRc8SpjYhUEdN9Y24lC2Dph24IPX+lUWsDSKssCBQp9vjIvvys QpcrP2Pa7TuJL8DiRcU1jSWhgAl/iVS4da8pUeHqLaOP3O5/TBHtDyHzgfQP55evQKo2 Gq7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cVuvolx0crP2RdRYi3l8AqoSD+eqXL2UwZAQBs6f87k=; b=UVQhDBQvkO+BqDKCh8o5OVjULfNSL7r6ARR4Rv+tWv9jRQb58rCglg0iYmxo1UZSFQ nhp6RpHg6Ck1rW//rqhhp/YVDwcRYdVYVZoKP/Hp/xK06nd/ZdPYnr41oh0VZ3BUWnBw 5/fMynMWYBkw7VbK53yy11Elm+lOK4aPEJ4c9PRem/WQlsZT6nTN2mjJ9NCkVn2WzqiJ n2Dr6Eysi08+huV25bxdJm5n8cNV/JEvqSLDCeBbQFnZ4VngtOwh28VRymDCzyE23Nn4 7GTIORVCaLzp2DH9FObwvDthTWwL+xjgv2Gr/QRgk+aXXKMkeQWdcnx3PaDTKoO8/S4Z CC6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ritRXhRU; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y21si7938760pfe.116.2019.06.16.09.28.08; Sun, 16 Jun 2019 09:28:23 -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=@gmail.com header.s=20161025 header.b=ritRXhRU; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727322AbfFPQ1U (ORCPT + 99 others); Sun, 16 Jun 2019 12:27:20 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:43577 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726087AbfFPQ1T (ORCPT ); Sun, 16 Jun 2019 12:27:19 -0400 Received: by mail-lf1-f67.google.com with SMTP id j29so4779466lfk.10 for ; Sun, 16 Jun 2019 09:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cVuvolx0crP2RdRYi3l8AqoSD+eqXL2UwZAQBs6f87k=; b=ritRXhRUWri2ajUBEJqAb8sN7dg1so0SakcFYpITeSodyL6ROwOWOP1wruSQb7gM0E 7v6zL7TWZjx4HEyzGcit1ShuLzToPmJWmc/hJw4+7X4KIKNjf/3eK0QhqY9G7X78+6wb WeCCIKjMV9ERdSda39uHxZxuuViTUcjDR+nV24QFyTAcEGCqwf/MhFotRPdDxhkjO03g 2xJvt6erCxUEWOuNvuvY5gK21c7TMNkQXwrI4on+F8rb/hL0v12NyL01o04WyE41x1lq foRlj2rPRgZ8U+Bggen1bNvqHkRLmKP7qNpb97M9YOVxRGp3JN/CZP9OEG7AReKQC/Q7 Rorw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cVuvolx0crP2RdRYi3l8AqoSD+eqXL2UwZAQBs6f87k=; b=hILUv9lPxNle0UlNdOoQJ17HPoB8TxQpnrWJsUgiiB2oVpMOMxvHtZVa+VAWahuroO nJPcA/4yagQZhQfvwI9gZeku5uRkmvk935sk3ua3aPnNNzwcwooiKrcTytRvTKRYlpz0 phzTecjMFCpSYkXXtgdNDqzjA4NmZkdBKAIgBejFt2ax2g8SHgoKrH51oTx7Eqf7Lf2W dZzVtWSoMCJc174LTDGx7YhvMdipxOEp41aRyus1+YFIBRZnq/zl7gMwyHH+zeOXV8hA XCUTaA/Y2z3tJuOraeX+ZKqkAhpb/o4T8PvJhT5v02od0LN0vEVSP0LZ15GpPi/l+Dvb tBFg== X-Gm-Message-State: APjAAAVcmBeVidipG3ijpl4pC7fj28hthk4f3HM6fpRm8NZS/BoNrqeO 97v3BBuoFbsTUR6YaqHu1c4= X-Received: by 2002:ac2:47fa:: with SMTP id b26mr18365774lfp.82.1560702437898; Sun, 16 Jun 2019 09:27:17 -0700 (PDT) Received: from esperanza ([176.120.239.149]) by smtp.gmail.com with ESMTPSA id q4sm1844099lje.99.2019.06.16.09.27.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Jun 2019 09:27:17 -0700 (PDT) Date: Sun, 16 Jun 2019 19:27:16 +0300 From: Vladimir Davydov To: Roman Gushchin Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Johannes Weiner , Shakeel Butt , Waiman Long Subject: Re: [PATCH v7 07/10] mm: synchronize access to kmem_cache dying flag using a spinlock Message-ID: <20190616162716.broxurphhmvdzy5s@esperanza> References: <20190611231813.3148843-1-guro@fb.com> <20190611231813.3148843-8-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190611231813.3148843-8-guro@fb.com> 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 04:18:10PM -0700, Roman Gushchin wrote: > Currently the memcg_params.dying flag and the corresponding > workqueue used for the asynchronous deactivation of kmem_caches > is synchronized using the slab_mutex. > > It makes impossible to check this flag from the irq context, > which will be required in order to implement asynchronous release > of kmem_caches. > > So let's switch over to the irq-save flavor of the spinlock-based > synchronization. > > Signed-off-by: Roman Gushchin Acked-by: Vladimir Davydov