Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995AbdCOJnS (ORCPT ); Wed, 15 Mar 2017 05:43:18 -0400 Received: from out0-141.mail.aliyun.com ([140.205.0.141]:46006 "EHLO out0-141.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752595AbdCOJnR (ORCPT ); Wed, 15 Mar 2017 05:43:17 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03294;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---.7oD7RVW_1489570962; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Aaron Lu'" , , Cc: "'Dave Hansen'" , "'Tim Chen'" , "'Andrew Morton'" , "'Ying Huang'" References: <1489568404-7817-1-git-send-email-aaron.lu@intel.com> <1489568404-7817-3-git-send-email-aaron.lu@intel.com> In-Reply-To: <1489568404-7817-3-git-send-email-aaron.lu@intel.com> Subject: Re: [PATCH v2 2/5] mm: parallel free pages Date: Wed, 15 Mar 2017 17:42:42 +0800 Message-ID: <0a2501d29d70$7eb0f530$7c12df90$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEyNDioRIMMjQ+pNoqJQkFd6dnlWQGAy2DfospugzA= Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 565 Lines: 24 On March 15, 2017 5:00 PM Aaron Lu wrote: > void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) > { > + struct batch_free_struct *batch_free, *n; > + s/*n/*next/ > tlb_flush_mmu(tlb); > > /* keep the page table cache within bounds */ > check_pgt_cache(); > > + list_for_each_entry_safe(batch_free, n, &tlb->worker_list, list) { > + flush_work(&batch_free->work); Not sure, list_del before free? > + kfree(batch_free); > + } > + > tlb_flush_mmu_free_batches(tlb->local.next, true); > tlb->local.next = NULL; > }