On (22/11/04 17:01), Minchan Kim wrote: > > One can be SW one can be HW. So I thought about having flexibility here. > > Instead of doing > > > > for (idx = 1; idx < MAX_IDX; idx++) { > > len = zcomp_compress(zram->comps[idx]); > > if (len <= threshold) > > break; > > } > > > > We would just directly use the suggested algo. > > > > But we probably don't need that param at all and can use > > the loop instead? > > I don't understand what param you are saying. I expected > the zram->comps array already has sorted algoritm based on the > priority so the loop will try compression as expected so loop is fine. > Are we on same page? I'll try to implement both loop and a specific algorithm selection.